This guide will help you troubleshoot common reasons you may be seeing a 404 error.
In this guide you'll find common reasons you may be seeing a 404 error while building your GitHub Pages site.
index.html fileIf you see a 404 error while building a GitHub Pages site, first check GitHub's Status page for any active incidents.
Make sure GitHub's DNS records are set up correctly with your DNS provider. For more information, see Managing a custom domain for your GitHub Pages site.
If your GitHub Pages site is private and you see a 404 error, you may need to clear your browser's cache. For more information on clearing your cache, see your browser's documentation.
index.html fileGitHub Pages will look for an index.html file as the entry file for your site.
Make sure you have an index.html file in the repository for your site on GitHub. For more information, see Creating a GitHub Pages site.
The entry file must be at the top level of your chosen publishing source. For example, if your publishing source is the /docs directory on the main branch, your entry file must be located in the /docs directory on a branch called main.
If your publishing source is a branch and directory, the entry file must be at the top level of the source directory on the source branch. For example, if your publishing source is the /docs directory on the main branch, your entry file must be located in the /docs directory on a branch called main.
If your publishing source is a GitHub Actions workflow, the artifact that you deploy must include the entry file at the top level of the artifact. Instead of adding the entry file to your repository, you may choose to have your GitHub Actions workflow generate your entry file when the workflow runs.
The name of the index.html file is case sensitive. For example, Index.html will not work.
The name of the file should be index.html, not index.HTML or any other variation.
Check that your directory contents are in the root directory.
If you're using a custom domain, make sure it's set up correctly. For more information, see About custom domains and GitHub Pages.
CNAME record should always point to <USER>.github.io or <ORGANIZATION>.github.io, excluding the repository name. For more information about how to create the correct record, see your DNS provider's documentation.Check whether your repository meets the following requirements.
main or default branch.If you are still receiving a 404 error, start a GitHub Community discussion in the Pages category.