Knowledgebase: Fixing 404 Errors on Inner Pages (Static HTML Websites)
If your homepage loads but your inner pages show 404 errors, this is always caused by an issue with your file structure, not a problem with PBN LTD hosting. Static HTML sites don’t use dynamic routing like WordPress—so correct file placement is critical.
✅ How Static HTML Routing Works
In static HTML setups, every page must directly match a real file on the server. There’s no routing logic like in WordPress or other CMS platforms.
For example:
-
Visiting
https://example.com/about-us.html
✔️ This works if you have a file namedabout-us.htmlin the root folder of your domain. -
Visiting
https://example.com/about-us/
❌ This does not work by default. That would require a folder calledabout-uswith a file namedindex.htmlinside it — and your structure must support that explicitly.
Most issues come from using folder-based URLs like /about-us/, which don’t work unless configured manually.
⚠️ Common Problem
You upload your website and place all files inside a folder like /my-site/, including inner folders such as /about-us/index.html.
Then you visit:
https://example.com/about-us/
❌ Result: 404 error
Why? Because your actual file path is:
/my-site/about-us/index.html — which doesn’t match the URL route unless specifically handled.
✅ Correct Setup for Static Sites
To avoid 404 errors:
-
Upload all your
.htmlfiles directly into the root folder of the domain -
Example structure:
/index.html /about-us.html /contact.html /services.html
Then link to these pages like so:
<a href="/about-us.html">About Us</a>
Do not use:
-
Folder structures unless absolutely needed
-
URLs ending in
/about-us/unless you’ve correctly created a/about-us/index.htmland it’s in the right place (root, not buried)
🧰 3 Steps to Fix It
-
Go to File Manager
From your dashboard, click the site name > use the File Manager. -
Move Files to the Root Folder
Move every page (e.g.,about-us.html,contact.html) into the root directory for your domain (whereindex.htmlis located). -
Update Your Links
Make sure your HTML uses file-based links like:
/about-us.htmlnot/about-us/
🧠 Reminder
Hosting can’t guess what you meant. If the file doesn’t exactly match the URL requested, it will return a 404.
So:
-
https://yourdomain.com/about.html→ works only ifabout.htmlexists in the root -
https://yourdomain.com/about/→ doesn’t work unless you’ve made a folder calledaboutwithindex.htmlinside it (and it’s in the root)
If in doubt, stick to .html files in the root directory.
View other On-Site Issues articles, or continue viewing other knowledgebase articles.