Havenswift Hosting Ltd
All guides

Where to put your website files

Almost every "my site shows the wrong thing" question comes down to files being in the wrong folder.

public_html

This is your website. A file at public_html/index.html is what people see at yourdomain.com. Anything above public_html โ€“ in your home directory โ€“ is not reachable from the web at all, which is why we keep backups and scripts there.

The index file

A web server serves index.html or index.php when someone asks for a folder. If neither exists you get either a directory listing or a 403. If you have uploaded home.html and expect it to appear, it will not.

The commonest mistake

Uploading a folder rather than its contents. If you upload mysite containing index.html, you end up with public_html/mysite/index.html, and your site appears at yourdomain.com/mysite while the main address shows nothing. Upload the contents, not the containing folder.

Addon domains and subdomains

Each gets its own folder, usually inside public_html. Check in cPanel which folder a domain is pointed at before uploading โ€“ putting the files in the right place for the wrong domain is easily done.

Case matters

Our servers are case-sensitive. Logo.PNG and logo.png are different files. A site built on Windows can work locally and show missing images once uploaded, entirely because of capital letters.

What not to put in public_html

Backups, database dumps and spare copies. If it is in public_html, it can be downloaded by anyone who guesses the name. Keep those in your home directory instead.

Other guides

Still stuck? Sign in and raise a ticket, and somebody will answer it.

Sign in