This version of GitHub Enterprise will be discontinued on This version of GitHub Enterprise was discontinued on 2020-01-22. 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.

Unpublishing a GitHub Pages site

You can unpublish your GitHub Pages site so that the site is no longer available to everyone using your GitHub Enterprise Server instance.

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.

People with admin permissions for a repository can unpublish a GitHub Pages site.

In this article

Unpublishing a project site

  1. On GitHub Enterprise, navigate to the main page of the repository.

  2. If a gh-pages branch exists in the repository, delete the gh-pages branch.

  3. If the gh-pages branch was your publishing source, your site is now unpublished and you can skip the remaining steps.

  4. Under your repository name, click Settings.

    Repository settings button

  5. Under "GitHub Pages", use the Source drop-down menu and select None.

    Drop down menu to select a publishing source

Unpublishing a user or organization site

  1. On GitHub Enterprise, navigate to the main page of the repository.

  2. Delete the master branch, or delete the entire repository. For more information, see "Creating and deleting branches within your repository" and "Deleting a repository."

Further reading

Ask a human

Can't find what you're looking for?

Contact us