GitHub Pages 404 Not Found
Why a GitHub Pages site returns 404: missing index.html, wrong file case, files outside the publishing source, bad CNAME and more, with the fix for each.
A GitHub Pages 404 usually means the site has no entry file where Pages looks for it. GitHub's troubleshooting guide lists the common causes: no index.html, an index.html in the wrong folder or with the wrong case, a custom domain CNAME that points at the wrong host, or a publish that never ran. Fix the file or DNS record, then rebuild.
Where does your site stand?
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
- Free audit in 60 seconds
- Fixes drafted for your review
- ChatGPT, Perplexity, Gemini and AI Overviews tracked
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
- Re-check after big site changes
- Keep this page for reference
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
- Follow the steps below
- Top-traffic pages first
- Check again in a month
At a glance
- index.html, lowercase, top level of the publishing source
- Entry file
- <USER>.github.io, no repository name
- Custom domain CNAME target
- Default branch, such as main
- Publishing branch
What causes a GitHub Pages 404
| Cause | Fix |
|---|---|
| GitHub outage | Check GitHub Status for active incidents. |
| DNS misconfiguration | Set GitHub's DNS records correctly with your DNS provider. |
| Stale browser cache on a private site | Clear your browser cache. |
No index.html | Add an index.html file to the repository. |
| Entry file in the wrong location | Put index.html at the top level of the publishing source directory on the source branch. |
| GitHub Actions artifact has no entry file | Include index.html at the top level of the deployed artifact. |
| Wrong filename case | Rename it to lowercase index.html. Index.html does not work. |
| Files not in the root directory | Move the site's contents to the root directory. |
| Custom domain CNAME is wrong | Point the record at <USER>.github.io or <ORGANIZATION>.github.io, without the repository name. |
| Links broke after adding or removing a custom domain | Make sure the site rebuilds when the domain changes. This may need a commit author set and a change to the custom domain settings. |
| Publishing branch is not the default branch | Publish from main or the repository's default branch. |
| No commit from an admin | Push a commit made by someone with admin permissions on the repository, such as the owner. |
| Site visibility changed | Rebuild the site to fix links broken by switching between public and private. |
| Private repository plan lapsed | Renew the GitHub Pro, Team or Enterprise Cloud plan so the site redeploys, or make the repository public. |
Check it in this order
- 1
Confirm the entry file
Open the repository on the publishing branch and check for a lowercase
index.htmlat the top level of the publishing source. - 2
Check the publishing source
In the repository settings, confirm Pages publishes from the branch and folder that hold the file, and that the branch is the default branch.
- 3
Check a GitHub Actions deploy
If you deploy with Actions, confirm the uploaded artifact contains
index.htmlat its top level. - 4
Check the custom domain record
If you use a custom domain, confirm the CNAME points at your
github.iohost without the repository name, and that the site rebuilt after any domain change. - 5
Push a fresh commit
Push a commit from a user with admin permissions to trigger a rebuild, then retest.
To show your own page for missing paths, GitHub says to name the file 404.html or 404.md and put it in the site's publishing source. A 404.md needs YAML front matter with permalink: /404.html.
Asked a lot.
3 questions people ask next, answered from the sources on this page.
01Why does my GitHub Pages site return 404 after deploy?
The most common documented cause is a missing or misplaced entry file. Check for a lowercase index.html at the top level of the publishing source or deployed artifact.
02Does the filename case matter for index.html?
Yes. GitHub says Index.html will not work. Rename it to lowercase index.html.
03What should my custom domain CNAME point to?
GitHub says to point it at <USER>.github.io or <ORGANIZATION>.github.io, without the repository name.
Every fact, linked and dated.
github.com
- 01GitHub Docs: Troubleshooting 404 errors for GitHub Pages sitesdocs.github.com · checked 2026-11-03
- 02GitHub Docs: Creating a custom 404 page for your GitHub Pages sitedocs.github.com · checked 2026-11-03
Keep learning
All errorsTools point. Agencies advise. This one ships.
Run the free audit, then approve the fixes. Every change can be undone.
- 46 fixes shipped without a ticket Brightpipe
- 0→7 ChatGPT citations in six weeks Paylane