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 named about-us.html in the root folder of your domain.

  • Visiting https://example.com/about-us/
    ❌ This does not work by default. That would require a folder called about-us with a file named index.html inside 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 .html files 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.html and it’s in the right place (root, not buried)


🧰 3 Steps to Fix It

  1. Go to File Manager
    From your dashboard, click the site name > use the File Manager.

  2. Move Files to the Root Folder
    Move every page (e.g., about-us.html, contact.html) into the root directory for your domain (where index.html is located).

  3. Update Your Links
    Make sure your HTML uses file-based links like:
    /about-us.html not /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 if about.html exists in the root

  • https://yourdomain.com/about/ → doesn’t work unless you’ve made a folder called about with index.html inside 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.