Skip to main content

This version of GitHub Enterprise was discontinued on 2023-03-15. 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.

Hover over a link to another article to get more details. If you have ideas for how we can improve this page, let us know in the discussion.

Unpublishing a GitHub Pages site

You can unpublish your GitHub Pages site so that the site is no longer available.

Who can use this feature

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

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

Unpublishing a project site

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

  2. If a gh-pages branch exists in the repository, delete the gh-pages branch. For more information, see "Creating and deleting branches within your repository."

  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. If you cannot see the "Settings" tab, select the dropdown menu, then click Settings.

    Screenshot of a repository header showing the tabs. The "Settings" tab is highlighted by a dark orange outline.

  5. In the left sidebar, click Pages.

  6. Under "GitHub Pages", use the branch dropdown menu and select None. Screenshot of Pages settings in a GitHub repository. A menu to select a branch for a publishing source, labeled "None," is outlined in dark orange.

Unpublishing a user or organization site

  1. On your GitHub Enterprise Server instance, navigate to the main page of the repository.
  2. Delete the branch that you're using as a publishing source, or delete the entire repository. For more information, see "Creating and deleting branches within your repository" and "Deleting a repository."