Article version: GitHub.com
About GitHub Pages
You can use GitHub Pages to host a website about yourself, your organization, or your project directly from a GitHub repository.
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 products."
You can host your site on GitHub's
github.io domain or your own custom domain. For more information, see "Using a custom domain with GitHub Pages."
To get started, see "Creating a GitHub Pages site."
To publish a user site, you must create a repository owned by your user account that's named
<user>.github.io. To publish an organization site, you must create a repository owned by an organization that's named
<organization>.github.io. Unless you're using a custom domain, user and organization sites are available at
The source files for a project site are stored in the same repository as their project. Unless you're using a custom domain, project sites are available at
For more information about how custom domains affect the URL for your site, see "About custom domains and GitHub Pages."
You can only create one user or organization site for each GitHub account. Project sites, whether owned by an organization or a user account, are unlimited.
Note: Repositories using the legacy
<user>.github.com naming scheme will still be published, but visitors will be redirected from
http(s)://<username>.github.io. If both a
<user>.github.io repository exist, only the
<user>.github.io repository will be published.
The publishing source for your GitHub Pages site is the branch or folder where the source files for your site are stored. All sites have a default publishing source, and project sites have additional publishing sources available.
Warning: GitHub Pages sites are publicly available on the internet, even if their repositories are private or internal. If you have sensitive data in your site's repository, you may want to remove it before publishing. For more information, see "About repository visibility."
The default publishing source for user and organization sites is the
master branch. If the repository for your user or organization site has a
master branch, your site will publish automatically from that branch. You cannot choose a different publishing source for user or organization sites.
The default publishing source for a project site is the
gh-pages branch. If the repository for your project site has a
gh-pages branch, your site will publish automatically from that branch.
Project sites can also be published from the
master branch or a
/docs folder on the
master branch. To publish your site from one of these sources, you must configure a different publishing source. For more information, see "Configuring a publishing source for your GitHub Pages site."
If you choose the
/docs folder of the
master branch as your publishing source, GitHub Pages will read everything to publish your site, including the CNAME file, from the
/docs folder. For example, when you edit your custom domain through the GitHub Pages settings, the custom domain will write to
/docs/CNAME. For more information about CNAME files, see "Managing a custom domain for your GitHub Pages site."
You cannot publish your project site from any other branch, even if the default branch is not
GitHub Pages publishes any static files that you push to your repository. You can create your own static files or use a static site generator to build your site for you. You can also customize your own build process locally or on another server. We recommend Jekyll, a static site generator with built-in support for GitHub Pages and a simplified build process. For more information, see "About GitHub Pages and Jekyll."
GitHub Pages will use Jekyll to build your site by default. If you want to use a static site generator other than Jekyll, disable the Jekyll build process by creating an empty file called
.nojekyll in the root of your publishing source, then follow your static site generator's instructions to build your site locally.
GitHub Pages does not support server-side languages such as PHP, Ruby, or Python.
- GitHub Pages sites created after June 15, 2016 and using
github.iodomains are served over HTTPS. If you created your site before June 15, 2016, you can enable HTTPS support for traffic to your site. For more information, see "Securing your GitHub Pages with HTTPS."
- GitHub Pages sites shouldn't be used for sensitive transactions like sending passwords or credit card numbers.
- Your use of GitHub Pages is subject to the GitHub Terms of Service, including the prohibition on reselling.
GitHub Pages sites are subject to the following usage limits:
GitHub Pages source repositories have a recommended limit of 1GB. For more information, see "What is my disk quota?"
Published GitHub Pages sites may be no larger than 1 GB.
GitHub Pages sites have a soft bandwidth limit of 100GB per month.
GitHub Pages sites have a soft limit of 10 builds per hour.
If your site exceeds these usage quotas, we may not be able to serve your site, or you may receive a polite email from GitHub Support or GitHub Premium Support suggesting strategies for reducing your site's impact on our servers, including putting a third-party content distribution network (CDN) in front of your site, making use of other GitHub features such as releases, or moving to a different hosting service that might better fit your needs.
GitHub Pages is not intended for or allowed to be used as a free web hosting service to run your online business, e-commerce site, or any other website that is primarily directed at either facilitating commercial transactions or providing commercial software as a service (SaaS).
Additionally, GitHub Pages sites must refrain from:
- Content or activity that is illegal or otherwise prohibited by our Terms of Service or Community Guidelines
- Violent or threatening content or activity
- Excessive automated bulk activity (for example, spamming)
- Activity that compromises GitHub users or GitHub services
- Get-rich-quick schemes
- Sexually obscene content
- Content that misrepresents your identity or site purpose
A MIME type is a header that a server sends to a browser, providing information about the nature and format of the files the browser requested. GitHub Pages supports more than 750 MIME types across thousands of file extensions. The list of supported MIME types is generated from the mime-db project.
While you can't specify custom MIME types on a per-file or per-repository basis, you can add or modify MIME types for use on GitHub Pages. For more information, see the mime-db contributing guidelines.