To publish a static website, upload its HTML, CSS and supporting files into the domain’s document root. The directory structure and stylesheet links must match so the browser can load the page correctly.

Prepare the files

Keep the site’s relative folders intact. For example, an index.html file may refer to css/style.css using this element inside its head:

<link rel="stylesheet" href="css/style.css">

index.html is a common default page name, but the server’s configured index order determines what loads. An existing index.php or another index file may take precedence.

Upload to the correct root

  1. Check the domain’s document root in cPanel’s Domains interface.
  2. Open that directory in Files > File Manager.
  3. Back up any files you intend to replace.
  4. Click Upload and upload the HTML, stylesheets, images and other dependencies. Preserve their relative locations.
  5. Wait for completion and return to the directory to review the files.

public_html is commonly the main domain’s root, but it is not the only directory that can contain a public site.

Test the website

Open the domain and inspect the layout. If styles or images are missing, check filename case, relative paths and browser network errors.

Use HTTPS resource addresses where appropriate. Keep private source archives and credentials outside the document root.