Changing the visibility of your GitHub Pages site

You can manage access control for your project site by publishing the site publicly or privately.

People with admin permissions for a repository can change the visibility of a Páginas de GitHub site.

Access control for Páginas de GitHub sites is available in private repositories with GitHub Enterprise Cloud. For more information about how you can try GitHub Enterprise Cloud for free, see "Setting up a trial of GitHub Enterprise Cloud."

About access control for Páginas de GitHub sites

If your project site is published from a private or internal repository that's owned by an organization using GitHub Enterprise Cloud, you can manage access control for the site. With access control, you can choose to publish the site publicly to anyone on the internet or privately to people with read access to your repository. A privately published site can be used to share your internal documentation or knowledge base with members of your enterprise. You cannot manage access control for an organization site. For more information about the types of Páginas de GitHub sites, see "About Páginas de GitHub."

Privately published sites are available at a different subdomain than publicly published sites. This ensures that your Páginas de GitHub site is secure from the moment it's published:

  • We automatically secure every subdomain of *.pages.github.io with a TLS certificate, and enforce HSTS to ensure that browsers always serve the page over HTTPS.
  • We use a unique subdomain for the private page to ensure that other repositories in your organization cannot publish content on the same origin as the private page. This protects your private page from "cookie tossing". This is also why we don't host Páginas de GitHub sites on the github.com domain.

You can see your site's unique subdomain in the pages tab of your repository settings. If you're using a static site generator configured to build the site with the repository name as a path, you may need to update the settings for the static site generator when changing the site to private. For more information, see "Configuring Jekyll in your Páginas de GitHub site" or the documentation for your static site generator.

To use a shorter and more memorable domain for your private Páginas de GitHub site, you can configure a custom domain. For more information, see "Configuring a custom domain for your Páginas de GitHub site."

Changing the visibility of your Páginas de GitHub site

  1. En GitHub, navega al repositorio de tu sitio.

  2. Debajo de tu nombre de repositorio, da clic en Configuración. Botón de configuración del repositorio

  3. In the left sidebar, click Pages. Page tab in the left-hand sidebar

  4. Under "Páginas de GitHub", select the Páginas de GitHub visibility drop-down menu, then click a visibility. Drop-down to choose a visibility for your site

  5. To see your published site, under "Páginas de GitHub", click your site's URL. URL of your privately published site

    Note: It can take up to 20 minutes for changes to your site to publish after you push the changes to GitHub. If your don't see your changes reflected in your browser after an hour, see "About Jekyll build errors for Páginas de GitHub sites."

Did this doc help you?Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

O, learn how to contribute.