FTP (File Transfer Protocol) is the simplest way to exchange (upload or download) files between computers on the Internet. FTP is commonly used to transfer web page files from the creator’s computer to the webserver that serves the pages to everyone on the Internet. It is also commonly used to download programs and other files to your computer from other servers.
FTP can be performed from a command line interface (eg. Windows MS-DOS Prompt) or using a desktop application (FTP client) that offers a graphical user interface such as FileZilla or CuteFTP. Some web browsers, such as Microsoft Internet Explorer, can also be used for FTP purposes and konsoleH includes the File Manager, which allows you to transfer files to and from your upload area.
As a minimum, you will require the following to start using FTP:
- The hostname or IP address of the source/destination computer: (eg. your-domain.com or 18.104.22.168)
- FTP username: (as per konsoleH)
- FTP password: (as per konsoleH)
- FTP port is: 21
Here are two examples of how to use FTP:
1. Using Microsoft Internet Explorer version 6:
1. Open Internet Explorer
2. Enter the FTP address in the address bar: ftp://www.your-domain.com/public_html/ (where ‘your-domain.com’ is the name of your registered domain with Hetzner)
3. Enter your FTP username and password when prompted
4. Once logged in, files can be transferred by dragging them to, or copying and pasting them in, the Internet Explorer window.
2. Using Windows Explorer:
1. Right click on the Windows ‘Start’ button
2. Select ‘Explore’
3. Enter the FTP address in the address bar: ftp://your-domain.com/public_html/ (where ‘your-domain.com’ is the name of your registered domain with Hetzner)
4. Enter your FTP username and password when prompted and click on ‘Log on’
5. Once logged in, the current site content on the server will be displayed. You can then copy and paste your new files to this location.
Using your preferred FTP application, log in to your remote server/host. Your default view is of the root (home) directory. Do NOT upload your website files directly to the home directory. All files intended for public viewing must be placed inside ‘public_html’. Be careful not to delete public_html which is actually a symbolic link, as this will prevent you from accessing the contents of your web site.
In any given directory, the webserver will (by default) look for a main page with one of the following names (in order of preference):
3. index.php (PHP only available with Basic accounts or higher)
Ensure that you name your main page by one of the above names. If no file with these names can be found, a directory listing will be displayed instead. UNIX is case sensitive, so INDEX.html is not the same as index.html. It is also possible that a directory listing is being displayed because of an .htaccess file being in place. The Index Manager in konsoleH allows you to enable or disable directory listings.
Hetzner provide a holding page “This will soon be the new home of…” named index.htm, you may want to rename this file or remove it.
The home directory of your account contains two important folders namely, ‘www_logs’ which contains your web logs and the ‘users’ folder, which is where your mailboxes reside. Web logs can be downloaded from the ‘www_logs’ folder using FTP. The ‘users’ folder is best left untouched. It contains email contents that is used by the email system.
There are two types of file transfer modes. Binary transfer mode is used to transfer image files (eg .gif, .jpeg) and ASCII mode should be used to transfer files that are readable as normal text (eg. html, cgi). Failure to properly select ASCII or Binary is a common cause of broken images and inoperative image maps and CGI scripts.
Acceptable naming convention: Linux servers are case sensitive. In other words, the file name ‘faq.html’ is NOT the same as ‘FAQ.html’. Incorrect link references will result in a ‘File Not Found’ error. This applies to directory names as well. To prevent errors, we recommend naming all files in lowercase and sticking to this as a convention. Apart from the underscore character (‘_’), spaces and special control characters (! @ # $ % ^ & ; * : ’ ~) are not permitted.