Skip to main content

This version of GitHub Enterprise Server was discontinued on 2024-09-25. 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 Server. For help with the upgrade, contact GitHub Enterprise support.

Unpublishing a GitHub Pages site

You can unpublish your GitHub Pages site so that your current deployment is removed and the site is no longer available. This is different from deleting the site.

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.

When you unpublish your site, your current deployment is removed and the site will no longer be available. Any existing repository settings or content will not be affected.

Unpublishing a site does not permanently delete the site. For information on deleting a site, see "Deleting a GitHub Pages site."

  1. On GitHub, navigate to the main page of the repository.
  2. Under GitHub Pages, next to the Your site is live at message, click .
  3. In the menu that appears, select Unpublish site.
    Screenshot of GitHub Pages settings showing the URL of a live Pages site. Under the horizontal kebab icon to the right, the "Unpublish site" dropdown option is outlined in dark orange.

Re-enabling a site that has been unpublished

Unpublishing your GitHub Pages site removes your current deployment. To make your site available again, you can create a new deployment.

Re-enable using GitHub Actions

A successful workflow run in the repository for your site will create a new deployment. Trigger a workflow run to redeploy your site.

Re-enabling your site when publishing from a branch

  1. Configure your publishing source to publish from a branch of your choosing. For more information, see "Configuring a publishing source for your GitHub Pages site."
  2. Commit to your publishing source to create a new deployment.