How can we help?

Search our guides and tutorials, or browse the categories below.

Do not delete the public_html folder when re-uploading files: your site may return 404

Hosting 34 views Markdown

If your files are in place but your domain returns 404 Not Found or shows a "certificate name mismatch" warning on HTTPS, the cause may be related to your site's publishing folder (public_html).

What is happening?

The web server is reloaded from time to time (for example when a new site or SSL is set up, and during weekly maintenance). If your public_html folder is missing or not accessible at the moment of the reload, the server cannot load that site. Even if the folder comes back later, the site can stay offline until the server is reloaded again. Symptoms: the server's generic 404 page over HTTP and a wrong certificate over HTTPS.

How to avoid it

  1. Do not delete or rename the public_html folder. Only replace the files inside it.
  2. Upload your new site to another folder first, then move its contents into public_html when the upload is finished. See our FTP guide for uploading.
  3. Make a backup before making changes.
  4. Keep sensitive folders of your application such as config, database and backup outside public_html (one level above) and adjust the file paths accordingly (for example require __DIR__ . '/../includes/file.php';). Do not move the publishing folder one level up, otherwise these folders become downloadable from the web.

If your site is already offline

Make sure your files are inside public_html and open a support ticket. Include your domain name and the error you see (404 or certificate warning); in this case the web server needs to be reloaded. If you see a PHP error on the site, see the guide on viewing the PHP error.

If you get stuck, open a support ticket.

Was this helpful?

Thanks for your feedback!

Still Need Help?

Our support team is here around the clock for anything you can't find above.