# GitHub Pages: What It Hosts, Its Limits, and When It Fits

Canonical: https://figment.so/blog/github-pages

GitHub Pages is free static hosting for HTML, CSS and JavaScript from a GitHub repository. Published sites may be no larger than 1 GB, and GitHub's usage policy rules out online businesses, e-commerce and SaaS sites.

GitHub Pages hosts static sites only: HTML, CSS and JavaScript files taken straight from a repository. It is free, but GitHub's usage policy says it is not for running a commercial or e-commerce site. GitHub describes it this way: "GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub, optionally runs the files through a build process, and publishes a website" ([GitHub Docs, "About GitHub Pages"](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages)).

## What does GitHub Pages host?

It hosts static files and nothing else. GitHub's setup guide says: "GitHub Pages does not support server-side languages such as PHP, Ruby, or Python" ([GitHub Docs, "Creating a GitHub Pages site"](https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-github-pages-site)). There is no database connection, PHP include or Python backend behind a Pages site. If your project needs one, Pages is the wrong host. A plain HTML/CSS/JS export or a static site generator's build output is what it is built for.

The site also needs an entry file: "GitHub Pages will look for an `index.html`, `index.md`, or `README.md` file as the entry file for your site" (same source). Without one at the right level of your publishing source, there is no homepage to serve.

## How do I publish a GitHub Pages site?

Pick a publishing source in your repository's Settings → Pages. GitHub gives you two options.

**Deploy from a branch.** Choose a branch, then choose the repository root or a `/docs` folder as the source. GitHub's documentation says: "Whenever changes are pushed to the source branch, the changes in the source folder will be published to your GitHub Pages site" ([GitHub Docs, "Configuring a publishing source for your GitHub Pages site"](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)). Push to that branch and the live site updates.

**Deploy with GitHub Actions.** Pick a starter workflow or write your own. GitHub builds and deploys the site through an Actions run that checks out the repository, builds the static output if needed, then uploads and deploys it with GitHub's Pages actions (same source). GitHub now steers people toward this option: "GitHub Actions is now the recommended approach for deploying and automating GitHub Pages sites" ([GitHub Docs, "About Jekyll build errors for GitHub Pages sites"](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/about-jekyll-build-errors-for-github-pages-sites)). It adds that the older Jekyll-based build process is still supported for sites that use it.

Changes are not instant. GitHub's docs say: "It can take up to 10 minutes for changes to your site to publish after you push the changes to GitHub" (same source).

## Does GitHub Pages use Jekyll by default?

Yes, when you publish from a branch. GitHub's documentation says: "If you publish your site from a source branch, GitHub Pages will use Jekyll to build your site by default" ([GitHub Docs, "Creating a GitHub Pages site"](https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-github-pages-site)). Jekyll is a static site generator with built-in GitHub Pages support, and GitHub's Jekyll documentation says: "We recommend using Jekyll with GitHub Pages" ([GitHub Docs, "About GitHub Pages and Jekyll"](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll)).

You are not locked in. The same page says: "If you prefer, you can use other static site generators or customize your own build process locally or on another server." If your source is already-built HTML and you do not want Jekyll's processing, which treats files and folders starting with an underscore as special and skips them, you have two options. Publish through a GitHub Actions workflow instead of a branch, which skips the Jekyll step, or add a `.nojekyll` file to bypass it on a branch-based site.

## What are GitHub Pages' size, bandwidth, and build limits?

GitHub documents these limits and calls two of them "soft" ([GitHub Docs, "GitHub Pages limits"](https://docs.github.com/en/pages/getting-started-with-github-pages/github-pages-limits)):

| Limit | What GitHub states |
| --- | --- |
| Published site size | "Published GitHub Pages sites may be no larger than 1 GB." |
| Source repository size | "GitHub Pages source repositories have a recommended limit of 1 GB." |
| Bandwidth | A "*soft* bandwidth limit of 100 GB per month." |
| Build frequency | A "*soft* limit of 10 builds per hour." |
| Build/deployment timeout | "GitHub Pages deployments will timeout if they take longer than 10 minutes." |
| Sites per account or repo | "Maximum of one pages site per account" (user/organization sites) and "Maximum of one pages site per repository" (project sites), per [About GitHub Pages](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages). |

"Soft" is GitHub's word for the bandwidth and build-frequency numbers. It is reasonable to read them as headroom, not a promise the site stays up past the limit, but GitHub does not say what happens if you exceed them, so do not plan a high-traffic launch around that gap.

## What can't I use GitHub Pages for?

You cannot use it to run an online business, e-commerce site or commercial SaaS. GitHub's usage policy says: "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)" ([GitHub Docs, "GitHub Pages limits"](https://docs.github.com/en/pages/getting-started-with-github-pages/github-pages-limits)).

Read narrowly, that targets sites whose main purpose is a business's commercial transactions or a SaaS product, not a freelancer's portfolio with a "hire me" link. A storefront, a booking system, or the marketing-plus-app site of a hosted SaaS product is not what Pages is for, whatever the technical limits.

## Can I use GitHub Pages with a private repository?

It depends on your plan, and a private repository does not make a private site. GitHub's plan documentation says GitHub Free (personal accounts) includes "GitHub Pages in public repositories," so the free personal tier needs a public source repo ([GitHub Docs, "GitHub's products"](https://docs.github.com/en/get-started/learning-about-github/githubs-products)). GitHub Pro and GitHub Team list GitHub Pages without that restriction, so a private repository can be a Pages source on those plans. GitHub Pages works from private repositories on GitHub Pro, Team and Enterprise plans ([GitHub Docs, "About GitHub Pages"](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages)).

The published site is still public unless you take a further step. To make the site visible only to people with repository access, GitHub says: "To publish a GitHub Pages site privately, you need to have an organization account. Additionally, your organization must use GitHub Enterprise Cloud" ([GitHub Docs, "GitHub's plans"](https://docs.github.com/en/get-started/learning-about-github/githubs-products)). A personal Pro account can source Pages from a private repo but cannot make the resulting site private.

## Can I use a custom domain with GitHub Pages?

Yes. GitHub Pages supports a custom domain with a documented DNS and verification process: A and AAAA records for an apex domain, a CNAME for `www`, a repository-side `CNAME` file, and a recommended domain-verification step. [Our guide to using a custom domain with GitHub Pages](/blog/github-pages-custom-domain) walks through the setup as GitHub documents it.

## Is GitHub Pages the right fit for my site?

It fits a static site you are comfortable keeping in a Git repository: documentation, a portfolio, a project's marketing page, or a blog built with a static generator. It does not fit when you need server-side logic Pages does not run, or when the site's purpose is a commercial transaction or a hosted SaaS product, which GitHub's usage policy excludes.

If you arrive with a folder of already-built HTML and CSS and no Git workflow, [our checklist for publishing an AI-generated static site](/blog/publish-ai-generated-static-website) covers the review and rollback steps that apply to any static host. Read the limits and the usage policy before you commit a business site to Pages.
