Article version: Enterprise Server 2.14

This version of GitHub Enterprise will be discontinued on This version of GitHub Enterprise was discontinued on 2019-07-12. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Creating a custom 404 page for your GitHub Pages site

GitHub Pages is available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server.

You can display a custom 404 error page when people try to access nonexistent pages on your site.

  1. Navigate to your GitHub Pages repository.
  2. Switch to the master branch for a User/Organization Pages site, or to the gh-pages branch for a Project Pages site.
  3. Create a HTML file named 404.html or create a new Markdown file named 404.md at the root level of your GitHub Pages repository.
  4. In the YAML front matter of your new 404 file, add permalink: /404.html.
  5. Add the content you want to display to lost souls and weary travelers.
  6. Commit your changes and, if you're working on a local clone of your repository, push them up to your GitHub Enterprise Server instance.

Ask a human

Can't find what you're looking for?

Contact us