Skip to main content

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. For more information, see "GitHub’s plans."

GitHub Pages now uses GitHub Actions to execute the Jekyll build. When using a branch as the source of your build, GitHub Actions must be enabled in your repository if you want to use the built-in Jekyll workflow. Alternatively, if GitHub Actions is unavailable or disabled, adding a .nojekyll file to the root of your source branch will bypass the Jekyll build process and deploy the content directly. For more information on enabling GitHub Actions, see "Managing GitHub Actions settings for a repository."

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.