"There isn't a GitHub Pages site here." 404: 6 causes
Fix GitHub Pages "There isn't a GitHub Pages site here." Check index.html, branch and folder, build time, custom domain DNS, private repos and account flags.
The Liite team8 دقيقة قراءة
Short answer
The 404 means GitHub has no published Pages site at that address. Start by checking that index.html sits at the top level of the folder you publish and that Settings > Pages points at the right branch and folder. Then wait up to 10 minutes for the build, and check DNS if only your custom domain fails.
You turned on GitHub Pages, opened the address, and got a 404 instead of your site:
There isn't a GitHub Pages site here.
Why it happens
The page comes from GitHub, not your browser. Your request reached GitHub, but no published Pages site matched it. These are the causes, most common first. The order is our rough judgment, not a ranking from GitHub.
- The entry file is in the wrong place. GitHub's docs say the entry file must be at the top level of your chosen publishing source. A file in a subfolder doesn't count. The name is also case sensitive, and Index.html will not work.
- The wrong branch or folder is selected. The source folder can be the root of the repository (/) or a /docs folder on the source branch. If your files are on another branch or in another folder, nothing is published.
- The build hasn't finished. It can take up to 10 minutes for changes to your site to publish after you push the changes to GitHub. People on GitHub's community forum report that an early visit can leave a 404 showing for a while.
- The URL or repository name doesn't match. A user site needs a repository named
username.github.io. A project site lives atusername.github.io/repo-name/. - A private repository on a plan without Pages. If you use a private repository, check that your GitHub Pro, Team or Enterprise Cloud subscription is still active. Renewing re-deploys the site.
- Custom domain DNS or an unflagged rebuild. Wrong or extra DNS records can break a custom domain. In one reported case, a domain only worked with
/index.htmlon the end, and an extra A record turned out to be the cause. - A flagged account. People report accounts flagged as bots, where Actions never ran and even the repository returned a 404 when logged out. GitHub doesn't document this in its Pages troubleshooting guide, so we can't say how common it is.
Step-by-step fixes
1. Put index.html at the top level of the published folder
- Open your repository on the branch you publish.
- If you publish from
/docs, check thatdocs/index.htmlexists. If you publish from the root, check thatindex.htmlis in the root. - Rename the file to exactly
index.html(lowercase) if needed. - Commit the change.
GitHub's docs say Pages looks for an index.html, index.md, or README.md file as the entry file. That is why a repository with only a README can show the README as the site, while one with none of these shows the 404.
2. Check the branch and folder in Pages settings
- Open the repository and click Settings.
- In the sidebar, click Pages.
- Under Build and deployment, check Source. Select Deploy from a branch if you publish static files.
- Pick the branch that holds your files and the folder (
/(root)or/docs), then click Save.
If you publish with a workflow instead, choose GitHub Actions as the source. Then the artifact you deploy must contain the entry file at its top level, per GitHub's guide to creating a site. See GitHub's page on configuring a publishing source for the current layout.
3. Trigger a build and wait
If you publish from a branch and the site hasn't published automatically, make sure someone with admin permissions and a verified email address has pushed to the publishing source. Also, commits pushed by a GitHub Actions workflow that uses the GITHUB_TOKEN do not trigger a Pages build.
- Push a small commit to the publishing branch as the repository owner.
- Open the Actions tab and watch for a run to finish.
- Wait up to 10 minutes, then open the site in a private window to skip any cached 404.
4. Check the address
Open the plain https://username.github.io/repo-name/ address from Settings > Pages. You can also click Visit site there. A missing repository path is a common reason for this exact 404.
5. Check private repository access
GitHub's troubleshooting page says that if your plan lapsed, you can change your repository's visibility to public to continue using GitHub Pages for free. Only do this if the contents are safe to publish. Switching visibility also changes the URL of your site, which results in broken links until the site is rebuilt.
6. Fix custom domain problems
- Test the plain
github.ioaddress first. If it works, the repository is fine and the problem is the domain. - Compare your DNS records with GitHub's instructions for custom domains and remove any record that isn't on their list. Extra A records are the cause people report most.
- Use an online DNS lookup tool to confirm what the domain really returns. GitHub's custom domain troubleshooting page suggests this.
- Remove and re-add the domain in Settings > Pages. GitHub notes you may need to remove and re-add your custom domain to trigger the process of enabling HTTPS.
GitHub also notes that it can take up to an hour for your site to become available over HTTPS after you configure your custom domain. A CNAME file in the repository does not automatically add or remove a custom domain, so set it in the settings.
7. Rule out a flagged account
If the repository itself shows a 404 in a private window and the Actions tab is empty, the account may be restricted. You can't fix this yourself. Contact GitHub Support and ask them to review the account. We don't know how long this takes.
Which cause matches which symptom
| Symptom | Likely cause | Fix |
|---|---|---|
| 404 right after turning Pages on | Build not finished | Wait up to 10 minutes, then use a private window |
| README shows instead of your page | No index.html at the top level | Add index.html to the published folder |
Works on github.io, 404 on your domain | DNS or domain setup | Clean up the records, re-add the domain |
username.github.io 404s, repo is a project | Missing /repo-name/ path | Use the project URL |
| Site vanished after a plan change | Private repo, plan lapsed | Renew the plan or make the repo public |
| Repository 404s in a private window, no Actions runs | Account flagged | Contact GitHub Support |
Public by default
A Pages site is public even when the repository is private, if your plan allows that. Don't publish a repository that holds secrets or private files.
Checklist before you try again
index.htmlis lowercase and at the top level of the published folder.- Settings > Pages shows the branch and folder where the files really are.
- The repository owner has pushed a commit, and the Actions run finished.
- You waited 10 minutes and tested in a private window.
- The URL has the
/repo-name/path if it's a project site. - For a custom domain, the plain
github.ioaddress was tested first.
If nothing works
GitHub's own page on troubleshooting 404 errors says to start a GitHub Community discussion in the Pages category if you still get a 404. If your repository also 404s while you're logged out, go to GitHub Support instead and mention the possible account flag. Include the repository URL, the exact error text, when you last pushed and the steps you tried.
Subject: GitHub Pages shows "There isn't a GitHub Pages site here." (404)
Hello,
My GitHub Pages site returns a 404 with the message
"There isn't a GitHub Pages site here."
Repository: https://github.com/USERNAME/REPO
Expected URL: https://USERNAME.github.io/REPO/
Publishing source: Deploy from a branch, BRANCH, /(root)
Last push: DATE AND TIME (UTC)
Actions tab: no runs / failed run (delete one)
Custom domain: none / DOMAIN
I have checked that index.html is at the top level of the published folder and waited more than 10 minutes. The repository also returns 404 when I am logged out (delete if untrue). Could you check whether my account or repository is restricted?
Thank you.If you only need a finished page online
If your files are already built and you just want a link, you can skip repositories, branches and Actions. Liite serves an uploaded .html file, a .zip, a folder or a PDF at its own <slug>.liite.site address. If your zip has one wrapper folder around index.html, Liite strips it automatically.
A Free uploaded site needs a card on file, goes offline 7 days after the last publish and is hidden from search engines. Paid sites don't expire. Liite doesn't run server code or build from source, so it suits finished files. See put an HTML file, a zip or a PDF online or free HTML hosting.
Common questions
Why do I see my README instead of my site?
Pages accepts a README as an entry file when there is no index.html at the top level of the published folder. Add index.html there and wait for the next build.
How long does a GitHub Pages build take?
GitHub says it can take up to 10 minutes after you push. If the Actions run has finished and the 404 remains, try a private window.
Why does my repository work but the site 404s?
The repository can be fine while Pages has no source set, the wrong branch or folder, or no entry file at the top level. Check Settings > Pages first.
Can I fix a flagged account myself?
No. Only GitHub can review it, so contact GitHub Support with the repository URL and the steps you've tried.