There are two basic types of GitHub Pages sites: Project Pages sites, and User and Organization Pages sites. They are nearly identical but have some important differences.

Project Pages sites are connected to a specific project, and the site files live on a branch within the project repository. User and Organization Pages sites are not tied to a specific project, and the site files live in a special repository dedicated to GitHub Pages files.

Warning: If the URL for your GitHub Pages site contains a username or organization name that begins or ends in a dash, or contains consecutive dashes, then people browsing with Linux will receive a server error when they visit the site. To fix this, change your GitHub Enterprise username to remove non-alphanumeric characters. For instructions on how to do this, see "Changing your GitHub username."

Project Pages sites

The source files for Project Pages sites live within the same repository as their project, and they are published from one of the following locations:

  • The master branch
  • The gh-pages branch
  • A folder named "docs" located on the master branch

For more information, see "Configuring a publishing source for GitHub Pages."

Building Project Pages sites

Both personal and organization accounts can create Project Pages sites, and the steps for creating Project Pages sites are the same for both.

If subdomain isolation is enabled on your GitHub Enterprise instance, Project Pages sites are available in the following locations after they're built:

  • A Project Pages site for a personal account is available at http(s)://pages.[hostname]/<username>/<projectname>/ .
  • A Project Pages site for an organization account is available at http(s)://pages.[hostname]/<orgname>/<projectname>/ .

If subdomain isolation is not enabled on your GitHub Enterprise instance, Project Pages sites are available in the following locations after they're built:

  • A Project Pages site for a personal account is available at http(s)://[hostname]/pages/<username>/<projectname>/ .
  • A Project Pages site for an organization account is available at http(s)://[hostname]/pages/<orgname>/<projectname>/ .

For more information, see "Enabling subdomain isolation" or contact your site administrator.

User and Organization Pages sites

The source files for User and Organization Pages sites live on the master branch in a dedicated repository named with the GitHub Enterprise account name:

  • To create a User Pages site, name the repository using the naming scheme <username>.[hostname] .
  • To create an Organization Pages site, name the repository using the naming scheme <orgname>.[hostname] .

Building User and Organization Pages sites

If subdomain isolation is enabled on your GitHub Enterprise instance, User and Organization Pages sites are available in the following locations after they're built:

  • A User Pages site is available at http(s)://pages.[hostname]/<username>.
  • An Organization Pages site is available at http(s)://pages.[hostname]/<orgname> .

If subdomain isolation is not enabled on your GitHub Enterprise instance, User and Organization Pages sites are available in the following locations after they're built:

  • A User Pages site is available at http(s)://[hostname]/pages/<username> .
  • An Organization Pages site is available at http(s)://[hostname]/pages/<orgname> .

For more information, see "Enabling subdomain isolation" or contact your site administrator.

User Pages sites can be built by any user account. They can also use deploy keys to automate the process. For more information, see "Managing deploy keys" in the GitHub Developer documentation.

Organization Pages sites can be built by any member with push access to the repository. To automate builds, you can set up a machine user as a member of your organization. For more information, see "Managing deploy keys." Deploy keys aren't supported for Organization Pages sites.

Further reading