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.

Tip: GitHub Pages sites are always publicly accessible when published, even if their repository is private, and they shouldn't be used for sensitive transactions like sending passwords or credit card numbers. For more information, see "What is GitHub Pages?"

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 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.

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)://<username>.github.io/<projectname> .
  • A Project Pages site for an organization account is available at http(s)://<orgname>.github.io/<projectname> .
  • If you're using a custom domain, see "Custom domain redirects for GitHub Pages sites."

Using a custom domain with your Project Pages site

If you are using a custom domain with a User or Organization Pages site, the custom domain replaces username.github.io in the URL for all Project Pages sites hosted under that account. Project Pages sites that use a custom domain are also available at username.github.io/projectname for personal accounts, and orgname.github.io/projectname for organizations. For more information, see "Using a custom domain with GitHub Pages."

Custom 404 error pages only work if a custom domain is used. Otherwise, the default User Page 404 is used. For more information, see "Creating a custom 404 for your GitHub Pages site."

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 account name:

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

Building User and Organization Pages sites

User and Organization Pages sites are available in the following locations after they're built:

  • A User Pages site is available at http(s)://<username>.github.io .
  • An Organization Pages site is available at http(s)://<orgname>.github.io .
  • If you're using a custom domain, see "Custom domain redirects for GitHub Pages sites."

User Pages sites can be built by any user account with a verified email address. 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 and a verified email address. 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