<Tech>Brunch


Fix Github Pages 404 Error

In order to have your static website hosted on Github pages, you must have a repository by name “github-username.github.io”. In this syntax, “github-username” refers to your Github username.
In case you have fiddled around with some default settings, or have made this particular repository private, or may be you played around some other Github repository settings, likelihood of getting error 404 hence forth becomes very much evident.



In order to make make your Github pages site live back again, ensure of following steps:

  • Make your Github pages repository public.
  • Make sure that the repository name follows the syntax: “.github.io”.
  • Once changes are saved in Github, do following at the location where you have cloned your Github pages repository:
    git commit –allow-empty -m “Trigger rebuild”
    git push


    That’s it. Your Github pages should be live again in less than a couple of minutes.