Free auditStart free
GuideError · CDN and hosting

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.

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 withChatGPTClaudePerplexityGoogleAI Mode

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
01Explained

What causes a GitHub Pages 404

GitHub's troubleshooting page for 404 errors lists the causes below.
Causes and fixes documented by GitHub
CauseFix
GitHub outageCheck GitHub Status for active incidents.
DNS misconfigurationSet GitHub's DNS records correctly with your DNS provider.
Stale browser cache on a private siteClear your browser cache.
No index.htmlAdd an index.html file to the repository.
Entry file in the wrong locationPut index.html at the top level of the publishing source directory on the source branch.
GitHub Actions artifact has no entry fileInclude index.html at the top level of the deployed artifact.
Wrong filename caseRename it to lowercase index.html. Index.html does not work.
Files not in the root directoryMove the site's contents to the root directory.
Custom domain CNAME is wrongPoint the record at <USER>.github.io or <ORGANIZATION>.github.io, without the repository name.
Links broke after adding or removing a custom domainMake 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 branchPublish from main or the repository's default branch.
No commit from an adminPush a commit made by someone with admin permissions on the repository, such as the owner.
Site visibility changedRebuild the site to fix links broken by switching between public and private.
Private repository plan lapsedRenew the GitHub Pro, Team or Enterprise Cloud plan so the site redeploys, or make the repository public.
02How 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.

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.

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.

Sources · 2

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • github.com
  1. 01GitHub Docs: Troubleshooting 404 errors for GitHub Pages sitesdocs.github.com · checked 2026-11-03
  2. 02GitHub Docs: Creating a custom 404 page for your GitHub Pages sitedocs.github.com · checked 2026-11-03
Free · 2 minutes

Tools point. Agencies advise. This one ships.

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

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane