GitHub Pages: free static web hosting with zero hosting costs
Learn how GitHub Pages removes your static hosting costs in 2026 while delivering strong performance and security.
Publish static sites and front-end apps for free without running a web server. GitHub Pages links a repository to a github.io address or a custom subdomain, supports automated deployments via GitHub Actions, and defines clear usage limits.
GitHub Pages: host a static site for free on GitHub.io or a custom subdomain
In 2026, the growth of statically generated documentation, portfolios, prototypes and interfaces strengthens the case for hosting directly in the development workflow.
Key takeaway
GitHub Pages remains a highly effective solution for publishing static files from a repository. The service supports custom domains, HTTPS and a flexible 100 GB monthly bandwidth limit, but it is not intended to host an online store or commercial SaaS for free.
Contents
- Why this matters now
- What it is
- What you can use it for
- Operational impact and ROI
- How to use it
- Pricing and business model
- Alternatives to consider
- A practical example
- Implementation guide
- Risks and limitations
- Questions to ask before you decide
- The KingLand verdict
- An AI explorer’s perspective
Why this matters now
Faster production of web interfaces and documentation increases the number of projects that can be delivered as static files. When an app can be compiled to HTML, CSS and JavaScript, it doesn't need an active PHP or Node.js server to render its interface.
Build orchestration can rely on tools like React 19.2 or Astro, provided they produce a compatible static output. Since January 1, 2026, GitHub also reduced prices for some hosted GitHub Actions runners by up to 39%, while usage of standard runners remains free for public repositories.
GitHub Pages enforces a flexible 100 GB monthly bandwidth limit. This threshold is not a contractual unlimited guarantee: for significant overages, GitHub may apply rate limits, contact the site owner or recommend a different architecture.
The platform therefore becomes a logical architectural choice for static content, provided you check the terms of use, site visibility, server-side compute needs and any GitHub Actions costs.
What it is
GitHub Pages is the static hosting service; GitHub.io is its default public domain. A user site typically uses proprietaire.github.io, while a project site takes the form proprietaire.github.io/repo-name/.
Content can be published from the branch root or the /docs folder, or built then deployed by a GitHub Actions workflow. Sites are public by default, even when sourced from a private repo; private publication with access control is reserved for organizations eligible for GitHub Enterprise Cloud.
Technology in brief
A managed platform to publish HTML, CSS, JavaScript and static assets from GitHub, with HTTPS, custom domains and DNS verification to reduce domain-takeover risks.
It brings versioning, build and web publishing closer together, without turning GitHub Pages into a full-stack execution platform.
What you can use it for
The service answers a specific need: publish documentation, portfolios, demos and client interfaces without maintaining an application server. It lowers operational burden for projects that require no local database or server-side dynamic logic.
- Hosting technical documentation : Suitable for documentation generated with Docusaurus, Sphinx, Hugo, Jekyll or other static site generators.
- Prototypes and front-end interfaces : Allows publishing an SPA or demo that talks to external APIs, provided you secure keys and remote services.
- Project pages and static editorial content : Suitable for portfolios, static blogs, open-source presentations and information pages that are not primarily intended to process commercial transactions.
GitHub Pages avoids web server administration for these use cases, but build, dependency security, DNS and external services still need oversight.
Operational impact and ROI
Integrating GitHub Pages can shorten the path from commit to publication and reduce some hosting costs. Actual savings depend on traffic volume, GitHub Actions minutes used, the domain chosen and required third-party APIs or services.
For lead developers & web architects
- Gain: Automatable publication from a branch or a GitHub Actions workflow, with execution history and configuration kept in the repo.
- Use: Documentation, technical portfolio, static demo or standalone front-end app. GitHub Pages does not natively provide a distinct preview environment for each pull request.
For CFOs & CTOs
- Gain: Possible reduction in hosting expenses for eligible static sites, with no permanent application server to provision.
- Use: Public documentation, project pages, static reports and informative interfaces that are not an online store or commercial SaaS hosted for free.
ROI is not automatically 100%: Pages can be free in many public scenarios, but domain costs, private workflows, build tools, APIs and maintenance can still incur expenses.
How to use it
Deployment is done from the repository settings. A simple site can be published directly from a branch; a framework requiring compilation can be built and deployed with GitHub Actions.
- Enable the service in your repository: Go to the repository settings (Settings) of your GitHub repo, then navigate to the Pages.
- Select the build source: Choose publication from a branch such as
mainorgh-pages, from its root or its /docs folder, or use a custom workflow via GitHub Actions. - Configure your custom domain: Enter your company subdomain (e.g.
docs.kingland.fr) in the corresponding section, then create a CNAME pointing to username.github.io or organization.github.io, without appending the repo name. - Enforce HTTPS: After DNS validation, enable Enforce HTTPS. GitHub can then automatically request a TLS certificate from Let’s Encrypt and renew it for the site.
- Submit your changes: Push your code or trigger the configured workflow. GitHub notes that publishing changes can take up to ten minutes.
Once configured, the site updates when the publication source changes or the defined workflow is triggered.
Pricing and business model
GitHub Pages is not billed as a separate hosting product, but its availability depends on plan and repository visibility. GitHub Actions workflows can also incur costs in private repos beyond included quotas.
| Plan tier | Monthly price | GitHub Pages availability | Key features included |
|---|---|---|---|
| GitHub Free | 0 $ | Public repositories | Public site, custom domain, HTTPS and a flexible 100 GB monthly bandwidth limit. |
| GitHub Pro | $4/month* | Public and private repositories | Publish a public site from a private repository; the private repo does not make the site private. |
| GitHub Team | From $4/user/month* | Public and private repositories | Team collaboration features and public publication from private repositories. |
| GitHub Enterprise Cloud | From $21/user/month* | Public, private and internal repositories | Private access control possible for eligible organizations on GitHub Pages sites published with Enterprise Cloud. |
* Indicative prices in US dollars observed on official pages in July 2026; some offers show promotional terms or annual billing. Verify prices on the official page at publication time.
Alternatives to consider
GitHub Pages favors static simplicity and repository integration. Other platforms are better when a project requires serverless functions, automatic previews or dynamic rendering.
- Vercel : A platform particularly well suited for full-stack frameworks like Next.js or SvelteKit. To understand their integrated cloud deployment approach, see our analysis at Vercel. It supports server-side rendering via its functions, unlike GitHub Pages.
- Cloudflare Pages : An edge-network oriented alternative. Requests for purely static assets are advertised as free and unlimited, while adding Pages Functions falls under Workers quotas and pricing.
- Netlify : A Jamstack platform that combines deployments, forms, serverless functions, preview environments and split-testing mechanisms.
Choose GitHub Pages for simple static publishing tightly integrated with GitHub. Prefer another platform when the project needs SSR, server functions, branch previews or commercial constraints incompatible with Pages terms.
A practical example
To illustrate the platform’s operation, here is a deployment scenario for technical documentation generated from a code repository.
The prompt / the action
We configure a public GitHub repo containing API documentation source. A GitHub Actions workflow builds on every commit to the main, then deploys the static artifact to GitHub Pages.
The result
After the git push, the workflow runs according to the configured trigger and publishes the site when the build succeeds. GitHub states changes can take up to ten minutes to appear. Search engine indexing is neither immediate nor guaranteed: it depends on crawl frequency, linking, sitemaps and content quality.
What can go wrong
The file .nojekyll is useful when publishing from a branch without wanting GitHub Pages to process content with Jekyll, especially if your build contains folders starting with an underscore. With a custom GitHub Actions workflow that deploys a static artifact directly, this file is not always necessary.
This scenario mainly shows the platform becomes quick to operate once the publication source, asset paths and workflow are correctly configured.
Implementation guide
Putting a site into production via GitHub Pages can be organized in three steps: prepare the source, perform a first deployment, then secure the domain and maintenance.
Phase 1: initial configuration
- Objective: Prepare the repository and hosting infrastructure.
- Action: Create or select the repository, enable GitHub Pages and choose the publication source. Add
.nojekyllonly if you publish from a branch with a static build that should not be processed by Jekyll. - Expected result: The repository has a valid source and a default github.io address.
Phase 2: first deployment
- Objective: Deploy a first functional and secure version.
- Action: If needed, configure a GitHub Actions workflow (
.github/workflows/deploy.yml) and add the subdomain in Settings → Pages before creating its CNAME at the DNS provider. - Expected result: The site is published and the custom domain can receive an automatic HTTPS certificate after DNS validation.
Phase 3: security and maintenance
- Objective: Ensure long-term hosting and lock down security.
- Action: Verify the domain in the personal or organization account settings, avoid wildcard DNS records, enable HTTPS and add useful SEO files such as sitemap.xml and robots.txt.
- Expected result: A reproducible publishing pipeline and much reduced risk of subdomain takeover.
A simple site can be online quickly, but DNS propagation and certificate issuance may take longer than repository setup.
Risks and limitations
GitHub Pages is economical and simple, but it imposes technical, contractual and security constraints to review before using it for a public project.
| Technical parameter | Strict limit / constraint | Operational impact |
|---|---|---|
| Execution type | Static hosting | No local database or permanent PHP, Python or Node.js execution on the server side. |
| Recommended repository size | 1 GB recommended | This threshold is a recommendation for the source repo; heavy media should typically be externalized. |
| Maximum published site size | 1 GB maximum | The final build folder of the static application cannot exceed this quota. |
| Build timeout | 10 minutes maximum per deployment | The deployment fails if it exceeds this duration. |
| Bandwidth | 100 GB per month, flexible limit | GitHub may apply rate limiting, contact the owner or recommend another solution in case of overages. |
Ideal for: API documentation, portfolios, online CVs, static blogs, open-source demos and single-page apps that talk to external APIs. GitHub Pages should not be used as the primary free hosting for an online store or commercial SaaS.
Watchouts: A subdomain takeover can occur when a custom domain remains configured in DNS while the repository, plan or Pages site is no longer associated. A third party could then try to attach that abandoned domain to their own site; domain verification and rapid removal of stale DNS records reduce this risk.
Avoid if: Your application requires server-side rendering, a local database, persistent server processing, sensitive transactions or authentication that the chosen Pages offering does not protect.
Static simplicity reduces some attack surface, but it does not relieve you of securing the repo, workflows, dependencies, external APIs and DNS.
Questions to ask before you decide
Before deploying your applications, here are the key answers to validate your hosting strategy.
[Decision-maker] Can I host multiple sites on my GitHub account?
Yes. An account can have a user or organization site at username.github.io, plus a project site per repository at username.github.io/project. Each Pages site can receive its own custom domain if configured in the corresponding repo and DNS is managed correctly.
[Ops / Product] Is it possible to host a React or Astro site?
Yes. You must automate the build command if needed, for example npm run build, via GitHub Actions and publish the output folder, typically /dist, /out or /build. For a project site at github.io/repo-name/, the framework must also be configured with the correct base path.
[CTO] How do I secure my company subdomains?
Verify the domain in account or organization settings, add the domain first in Settings → Pages, avoid wildcard DNS records and immediately remove obsolete CNAMEs.
[Beginner] Can I use GitHub Pages for a classic WordPress blog?
No. WordPress normally requires PHP and a database, which GitHub Pages does not run. An exported static copy can be published, but you must accept losing or externalizing dynamic functions.
These answers help distinguish free static hosting, custom domains and cases that need a more complete platform.
The KingLand verdict
Our evaluation is based on publishing simplicity, potential cost, official limits, DNS security and fit for static architectures.
We give GitHub Pages a score of 4,5 / 5 for documentation, portfolios and static projects compatible with its terms of use.
KingLand's verdict: Highly recommended for a static project tied to GitHub, provided you control site visibility, Actions costs, asset paths and the lifecycle of DNS records.
For an IT department, GitHub Pages is an excellent targeted publishing tool, but not a universal replacement for Vercel, Netlify, Cloudflare Pages or an application host.
An AI explorer’s perspective
The trajectory of web infrastructure shows one thing: the more a project can be precompiled, the more you can separate interface delivery from business-logic execution.
"GitHub Pages reminds us of a useful rule: don't deploy a server when a set of static files is sufficient. This sobriety lowers costs and part of the attack surface, without removing responsibilities. The repository, dependencies, GitHub Actions workflow, external services and especially DNS remain critical components. The quality of a static architecture is measured as much by its ease of publication as by the cleanliness of its decommissioning."
A sober, reliable solution for its scope, provided you don't ask it to become a backend it isn't.