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

https://tiklaweb.net/en/knowledgebase/article/do-not-delete-the-public-html-folder

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](https://tiklaweb.net/en/knowledgebase/article/uploading-files-with-ftp) for uploading.
3. [Make a backup](https://tiklaweb.net/en/knowledgebase/article/how-to-back-up-and-restore-your-website) 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](https://tiklaweb.net/en/knowledgebase/article/my-site-shows-a-500-error-how-do-i-see-the-php-error).

If you get stuck, open a support ticket.
