Build
How to upload a static site to cPanel
Zip the built output, upload it to public_html through File Manager, extract it, and delete any default index file. The contents of the build folder go into public_html — not the folder itself.
Before you start
- cPanel access
- Your built site as a ZIP
The steps
-
Step 1: Build the site
Producing a folder of static files — HTML, CSS, JS, images, sitemap and robots.txt.
-
Step 2: Zip the contents, not the folder
Select everything inside the build output and compress that. A ZIP containing one folder puts your site at /dist/ instead of the root.
-
Step 3: Open File Manager
cPanel → Files → File Manager → public_html.
-
Step 4: Remove the default files
Any placeholder index.html or default.htm the host installed.
-
Step 5: Upload the ZIP
The Upload button. Wait for it to reach 100% before navigating away.
-
Step 6: Extract in place
Right-click the ZIP → Extract, into public_html.
-
Step 7: Delete the ZIP
It is now duplicated storage and, if crawlable, an accidental download of your whole site.
-
Step 8: Verify
Load the home page, one deep page, /robots.txt and /sitemap-index.xml. All four must return 200.
The mistake that shows up as a broken site
Uploading a ZIP that contains the build folder itself. Everything extracts one level too deep, the home page 404s, and the fix is to move the contents up one level.
Check the file count
Note how many files the build produced and compare after extraction. Interrupted uploads are silent — the ZIP appears to arrive and extraction quietly omits the tail.
Getting clean URLs right
A static site built with directory-style output serves /about/ from /about/index.html, which Apache handles without configuration. If your build emits /about.html instead, the URL will be /about.html and your canonicals must match it exactly. Decide which you want before launch rather than after, because changing the convention later means a redirect for every page on the site.
The background behind this
Technical SEO, in the order the problems actually block you covers the reasoning in about 4 minutes — free, ungated, written from client work.
Who wrote this
Anas Bin Masud builds e-commerce sites and does technical SEO for businesses in the UK, Canada, Ireland and Pakistan. These procedures are the ones I run on client work, written down rather than invented — including the ones where the honest answer is that the fix is not available on your current hosting.