Uploading a Static Website

How to publish HTML, CSS, JavaScript, and image files to hosting, set the right index file, and test routes.

Web Hosting Updated 15 June 2026

A static website is made from files such as HTML, CSS, JavaScript, images, fonts, and downloads. It does not need PHP, MySQL, or a long-running application process.

Prepare the Files

If the site was built with a tool such as Astro, Hugo, Vite, React, or Vue, upload the generated build output, not the source project. The live hosting account usually needs the contents of folders such as dist, build, or public.

The web root should contain an index file, normally index.html. If the index file is inside another nested folder, visitors may see a directory listing or a 404.

Upload the Site

  1. Open the website in Enhance.
  2. Use File Manager, FTP, or SFTP to open the website document root.
  3. Upload the generated static files.
  4. Keep the folder structure from the build output intact.
  5. Load the domain in a browser and check the home page.

Check Links and Routes

Static sites with client-side routing may need rewrite rules so refreshes on nested URLs work. If /about works after clicking a link but fails after refreshing the page, the site probably needs a fallback to index.html.

For plain HTML sites, each page should have a real file or folder path, such as /about/index.html.

Enable HTTPS

Once DNS points to the hosting account, enable SSL and force HTTPS. Then check that CSS, JavaScript, fonts, and images load over HTTPS. Mixed HTTP assets can make the browser show warnings even when the certificate is valid.

Forms and Dynamic Features

A static site cannot process contact forms by itself. If the site has a form, it needs one of these:

  • A third-party form service.
  • A PHP form handler configured on the hosting account.
  • A separate API hosted elsewhere.

Before Announcing the Site

  • Test the home page, navigation, forms, and downloads.
  • Check mobile layout.
  • Confirm HTTPS is active and forced.
  • Check the browser console for missing files.
  • Take a backup of the working upload.