# 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.

Canonical: https://scaplet.com/errors/cdn/github-pages-404

Guide GitHub Pages Error · CDN and hosting

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.

3 min

read

2

sources

Oct 31, 2026

updated

Scaplet Editorial Team

author

In one line

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.

30-second check

## Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fgithub-pages-404%20(%22GitHub%20Pages%20404%20Not%20Found%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fgithub-pages-404%20(%22GitHub%20Pages%20404%20Not%20Found%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fgithub-pages-404%20(%22GitHub%20Pages%20404%20Not%20Found%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fgithub-pages-404%20(%22GitHub%20Pages%20404%20Not%20Found%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

## At a glance

3 facts from the sources below

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

_01_Explained

## What causes a GitHub Pages 404

GitHub's troubleshooting page for 404 errors lists the causes below.

Causes and fixes documented by GitHub
| 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](/glossary/http-caching) 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. |

_02_How it works

## Check it in this order

1. 1

### Confirm the entry file

Open the repository on the publishing branch and check for a lowercase `index.html` at the top level of the publishing source.
2. 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. 3

### Check a GitHub Actions deploy

If you deploy with Actions, confirm the uploaded artifact contains `index.html` at its top level.
4. 4

### Check the custom domain record

If you use a custom domain, confirm the CNAME points at your `github.io` host without the repository name, and that the site rebuilt after any domain change.
5. 5

### Push a fresh commit

Push a commit from a user with admin permissions to trigger a rebuild, then retest.

**Still stuck**GitHub's guide says to start a discussion in the Pages category of GitHub Community if the 404 remains after these checks.

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`.

Questions

## Asked a lot.

3 questions people ask next, answered from the sources on this page.

_01_ Why 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.

_02_ Does the filename case matter for index.html?

Yes. GitHub says `Index.html` will not work. Rename it to lowercase `index.html`.

_03_ What should my custom domain CNAME point to?

GitHub says to point it at `<USER>.github.io` or `<ORGANIZATION>.github.io`, without the repository name.

Sources · 2

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- github.com

1. 01 [GitHub Docs: Troubleshooting 404 errors for GitHub Pages sites](https://docs.github.com/en/pages/getting-started-with-github-pages/troubleshooting-404-errors-for-github-pages-sites) docs.github.com · checked 2026-11-03
2. 02 [GitHub Docs: Creating a custom 404 page for your GitHub Pages site](https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site) docs.github.com · checked 2026-11-03

## Keep learning

[All errors](/errors)

[Learn Cloudflare Pages 404 Not Found CDN and hosting errors](/errors/cdn/cloudflare-pages-404) [Related HTTP status codes Crawling and indexing](/glossary/http-status-codes) [Read next Firebase Hosting 404 CDN and hosting errors](/errors/cdn/firebase-hosting-404) [Do Run a free site audit Free, about two minutes](/site-audit)

Other 404 errors
[Cloudflare Pages 404 Not Found](/errors/cdn/cloudflare-pages-404) [CloudFront 404 Not Found](/errors/cdn/cloudfront-404) [Firebase Hosting 404](/errors/cdn/firebase-hosting-404) [404 Not Found](/errors/http/404) [404 Not Found caused by .htaccess](/errors/http/404/htaccess)

More in CDN and hosting errors
[AWS Lambda 502 Bad Gateway](/errors/cdn/aws-lambda-502) [AWS Lambda timeout](/errors/cdn/lambda-timeout) [Azure Front Door 502](/errors/cdn/azure-front-door-502) [Cloud Run 503 error](/errors/cdn/cloud-run-503) [Cloudflare 504 Gateway Timeout](/errors/cdn/cloudflare-504) [Cloudflare Pages 404 Not Found](/errors/cdn/cloudflare-pages-404) [Cloudflare too many redirects (ERR_TOO_MANY_REDIRECTS)](/errors/cdn/cloudflare-too-many-redirects) [Cloudflare verify you are human loop](/errors/cdn/cloudflare-verify-you-are-human-loop) [CloudFront 400: Bad Request](/errors/cdn/cloudfront-400) [CloudFront 404 Not Found](/errors/cdn/cloudfront-404) [CloudFront 503: Service Unavailable](/errors/cdn/cloudfront-503) [Firebase Hosting 404](/errors/cdn/firebase-hosting-404) [GitHub Pages 404 Not Found](/errors/cdn/github-pages-404) [Google Cloud 502 Bad Gateway](/errors/cdn/google-cloud-502) [Heroku 503 Service Unavailable](/errors/cdn/heroku-503) [Heroku H10: App crashed](/errors/cdn/heroku-h10-app-crashed) [Heroku H12: Request timeout](/errors/cdn/heroku-h12-request-timeout) [Heroku H13: Connection closed without response](/errors/cdn/heroku-h13) [Heroku H14: No web processes running](/errors/cdn/heroku-h14) [Netlify build failed](/errors/cdn/netlify-build-failed) [Netlify function timeout](/errors/cdn/netlify-function-timeout) [Render 502 Bad Gateway](/errors/cdn/render-502) [S3 Access Denied (403 Forbidden)](/errors/cdn/s3-access-denied) [Vercel 413: FUNCTION_PAYLOAD_TOO_LARGE](/errors/cdn/vercel-payload-too-large)

Terms on this page
[HTTP caching](/glossary/http-caching)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

Run the free audit, then approve the fixes. Every change can be undone.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
