Can you use GitHub Pages with a private repo for free?
Quick answer
No. On GitHub Free, “the repository must be public,” per GitHub's undated doc Creating a GitHub Pages site. GitHub Pro, Team, and Enterprise Cloud publish from a private repository, but the site stays “publicly available on the internet” unless Enterprise Cloud publishes it privately.
Free plan: no credit card, 1 published page. A private link or a password needs Pro.
On this page
- Which GitHub plans publish Pages from a private repository
- What a private Pages repository costs
- Is the site private if the repository is private?
- Publishing a site privately: GitHub Enterprise Cloud only
- A custom domain on a site from a private repository
- What happens to the site if your paid plan ends
- Hosts that keep a page private on free or cheap plans
- If your page is one HTML file: Convika
- Which one to pick
- Frequently asked questions
- Sources
No. On GitHub Free, a Pages site needs a public repository: “If the account that owns the repository uses GitHub Free or GitHub Free for organizations, the repository must be public,” says GitHub's undated doc Creating a GitHub Pages site. GitHub Pro, GitHub Team, and GitHub Enterprise Cloud can publish from a private repository, and the site is still public: “GitHub Pages sites are publicly available on the internet, even if the repository for the site is private (if your plan or organization allows it).” Only an organization on GitHub Enterprise Cloud can publish a site privately, for “people with read access to the repository.”
GitHub's docs and pricing page were read on November 1, 2026. GitHub's docs show no date, so this page dates what it quotes by that reading. Plans change, so check them before you pay.
Whether a Pages site may sell or run a business is a separate rule, covered in Can you use GitHub Pages for a commercial or business site?. Size, bandwidth, and build limits are in GitHub Pages limits. This page covers private repositories and who can open the site.
Which GitHub plans publish Pages from a private repository
GitHub's docs put it in 1 sentence: “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.” GitHub's pricing page lists “Pages and wikis” for Free as “Public repositories,” and as included on Team and Enterprise.
| GitHub plan | Price on GitHub's pricing page | Pages from a private repository | Who can open the site |
|---|---|---|---|
| GitHub Free, personal account | $0 (pricing) | No: “the repository must be public” (docs) | Anyone on the internet |
| GitHub Free for organizations | $0 (pricing) | No: “the repository must be public” (docs) | Anyone on the internet |
| GitHub Pro, personal account | Not listed on the pricing page | Yes (plans) | Anyone: sites are “publicly available on the internet, even if the repository for the site is private” (docs) |
| GitHub Team | $4 per user a month (pricing) | Yes (plans) | Anyone, by the same rule |
| GitHub Enterprise Cloud | Enterprise: $21 per user a month (pricing) | Yes (docs) | Anyone, or, published privately, only “people with read access to the repository” (visibility) |
| GitHub Enterprise Cloud with Enterprise Managed Users | Enterprise: $21 per user a month (pricing) | Yes, from organization repositories only | Enterprise members only: sites “are always privately published” (limits) |
GitHub Enterprise Server, which a company runs on its own servers, also publishes from private repositories. GitHub's plans doc adds under Pro and Team: “To publish a GitHub Pages site privately, you need to have an organization account. Additionally, your organization must use GitHub Enterprise Cloud.”
What a private Pages repository costs
The plan is the main cost. GitHub's pricing page lists GitHub Team at $4 per user a month and Enterprise at $21 per user a month, and doesn't list GitHub Pro's price.
Whether the builds cost anything, GitHub's docs disagree. Every Pages site deploys with a GitHub Actions workflow. GitHub's creating-a-site doc says “Standard GitHub Actions runners are free for public repositories. For private and internal repositories, usage charges apply after the included compute usage for your plan is consumed.” GitHub's Actions billing doc says “The use of standard GitHub-hosted runners is free,” and lists “In public repositories,” “For GitHub Pages,” and “For Dependabot.” GitHub doesn't say which of the 2 applies to a Pages build from a private repository, so check the account's Actions usage after the first builds.
Is the site private if the repository is private?
No. GitHub's creating-a-site doc warns: “GitHub Pages sites are publicly available on the internet, even if the repository for the site is private (if your plan or organization allows it). If you have sensitive data in your site's repository, you may want to remove the data before publishing.”
A private repository hides the repository. GitHub's doc About repositories says “Private repositories are only accessible to you, people you explicitly share access with, and, for organization repositories, certain organization members.” What Pages publishes from it, anyone with the address can open.
GitHub's limits doc adds a rule on any plan: “GitHub Pages sites shouldn't be used for sensitive transactions like sending passwords or credit card numbers.” GitHub's Pages docs read for this page describe no password setting for a site.
Publishing a site privately: GitHub Enterprise Cloud only
GitHub calls it access control. The visibility doc: “A privately published site can only be accessed by people with read access to the repository the site is published from.” And: “To publish a GitHub Pages site privately, your organization must use GitHub Enterprise Cloud.”
4 things to know before you count on it:
- A project site in an organization. “Access control is available for project sites that are published from a private or internal repository that are owned by the organization. You cannot manage access control for an organization site.” A personal account's site can't be private on any plan.
- A GitHub account with read access for every visitor. Someone without read access, such as a customer with no GitHub account, can't open the site.
- A different address. “Privately published sites are available at a different subdomain than publicly published sites,” under
*.pages.github.io, and not at<owner>.github.io. You can add a custom domain for a shorter address. - Admin access to switch it. In the repository, go to Settings > Pages, and choose from the GitHub Pages visibility menu. Only “People with admin access to a repository can change the visibility of a GitHub Pages site.”
GitHub's visibility doc links a free trial of GitHub Enterprise Cloud. With Enterprise Managed Users, the choice is made for you: Pages sites “can only be published from repositories owned by organizations” and “are always privately published, and you cannot change this visibility.”
A custom domain on a site from a private repository
A site from a private repository takes a custom domain like any other. GitHub's custom domains doc: “GitHub Pages works with two types of domains: subdomains and apex domains,” such as www.example.com, blog.example.com, and example.com. A privately published site can use one too, and “The URLs for project sites that are privately published are not affected by the custom domain for your user or organization site.”
The risk is a lapse. The same doc: “If you downgrade from GitHub Pro to GitHub Free, any GitHub Pages sites that are currently published from private repositories in your account will be unpublished.” And: “If your GitHub Pages site is disabled but has a custom domain set up, it is at risk of a domain takeover.” GitHub recommends verifying the domain before adding it, which “prevents other GitHub users from using your domain with their repositories.”
What happens to the site if your paid plan ends
On a personal account, GitHub unpublishes it. GitHub's docs name these cases:
| What changes | What GitHub's docs say happens to the site | Source |
|---|---|---|
| GitHub Pro downgraded to GitHub Free | “any GitHub Pages sites that are currently published from private repositories in your account will be unpublished” | Custom domains |
| An organization's plan downgraded | “the organization will lose access to any functionality that is not included in the new plan”; GitHub suggests making the repositories public to keep Pages | Downgrading your account's plan |
| A Pages repository made private on GitHub Free | “Any published GitHub Pages site will be automatically unpublished.” | Setting repository visibility |
| A private repository moved to a GitHub Free account | It loses “features like protected branches and GitHub Pages” | Transferring a repository |
| An Enterprise Cloud organization leaves Enterprise Cloud with a privately published site | GitHub doesn't say | The visibility and downgrade docs |
A personal downgrade takes effect on the next billing date: the downgrade screen lists “the features your personal account will no longer have access to on your next billing date.” Before downgrading from Pro, GitHub says: “If you published a GitHub Pages site in a private repository and added a custom domain, remove or update your DNS records before downgrading from GitHub Pro to GitHub Free, to avoid the risk of a domain takeover.”
Hosts that keep a page private on free or cheap plans
| Host | Private source on the free plan | Keeping visitors out | What that costs |
|---|---|---|---|
| GitHub Pages | No on Free; yes on Pro, Team, and Enterprise Cloud (docs) | Only on Enterprise Cloud, for “people with read access to the repository” (docs) | GitHub Enterprise, $21 per user a month (pricing) |
| Cloudflare Pages | Yes: “Both private and public repositories are supported” (docs) | A Cloudflare Access login on preview links; the pages.dev address and your own domain take extra steps (docs) | Access is part of Cloudflare One, which has a “Zero Trust Free plan” (setup); the docs read for this page don't give its user limit |
| Netlify Free | Private repositories owned by a GitHub organization are a Pro feature (pricing) | Free: a private project, “visible only to the Team Owner”; a shared password needs Pro (docs) | Netlify Pro, $20 a month (pricing) |
| Vercel Hobby | Not from an organization: “You cannot deploy to a Hobby team from a private repository in a GitHub organization” (docs) | Vercel Authentication on every plan, which lets only Vercel users with access in; Hobby can add “one external user per account”; a password needs Pro (docs) | Vercel Pro, $20 a month (pricing), plus $20 a month for each project with a password (docs) |
| GitLab Pages Free | Yes: the project “can be either public, internal, or private” (docs) | Access control on Free: “Only project members can browse the website” (docs) | Free, with “5 users per top-level group” (pricing) |
| Convika | No repository: you upload the page's HTML file or paste its code | Free: Public only. Pro: Private link or Only people with the password (pricing) | Pro, $12 a month |
Cloudflare Pages and Vercel build from a private repository and serve the site to anyone, as GitHub Pages does on Pro, unless you turn on a login. On new accounts, Netlify starts each project private, seen only by the Team Owner on Free, until you publish it. On a free plan, GitLab Pages can limit a site to a private project's members, and Vercel Hobby can put one behind Vercel's own login, with 1 outside user.
If your page is one HTML file: Convika
Convika hosts landing pages, one HTML page each, with a form that keeps entries and stats on who visited. There is no repository to make public: you upload the page's HTML file, up to 2 MB, or paste its code. Claude, Claude Code, or Codex can also save the page through Convika's MCP server.
Who can open the page depends on the plan. You choose when you publish, under “Who can open this page?”:
- Public, on every plan: anyone with the link can open it, and it may show up in search results and in Convika's gallery. Free publishes Public pages only.
- Private link, on Pro: anyone with the link can open it, with no password or account, and it stays out of search results and the gallery.
- Only people with the password, on Pro: visitors see a password screen, and Convika sends the page only after the right password. Search engines see just the password screen.
Pro costs $12 a month. If Pro ends without payment, a page on a private link or with a password goes offline; it never turns Public, and it stays in your account. Free includes 1 published page, 10,000 page views a month, 50 form entries shown a month, and 1 custom subdomain such as www.yourbrand.com, with a small Convika bar. Pricing lists each plan.
Not a fit for: a Jekyll site, documentation with many pages, or a site that rebuilds from a repository on every push. Convika hosts a single HTML document per page. The guide How to password protect an HTML page compares the ways to put a page behind a password.
Which one to pick
- Code you want private, a site anyone can open: Pay for GitHub Pro or Team, or build the private repository on Cloudflare Pages' free plan, which supports private repositories.
- Internal docs for your organization only: Use GitHub Enterprise Cloud's private publishing, or GitLab Pages' access control on GitLab's Free tier.
- An open-source project's site: Stay on GitHub Free with a public repository.
- One page for a client, a class, or a small group: Use Convika Pro, with a Private link or a password, and no repository at all.
Frequently asked questions
Can you use GitHub Pages with a private repo for free?
No. GitHub's docs say “If the account that owns the repository uses GitHub Free or GitHub Free for organizations, the repository must be public.” Publishing from a private repository needs GitHub Pro, GitHub Team, or GitHub Enterprise Cloud, and the site is still public unless Enterprise Cloud publishes it privately.
Does GitHub Pages work with a private repository?
Yes, on a paid plan. GitHub's docs list Pages “in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server.” On GitHub Free and GitHub Free for organizations, Pages works with public repositories only.
Is a GitHub Pages site private if the repository is private?
No. GitHub's docs say “GitHub Pages sites are publicly available on the internet, even if the repository for the site is private.” Only an organization on GitHub Enterprise Cloud can publish a site privately, for people with read access to the repository.
How much does GitHub Pages cost for a private repo?
$4 per user a month on GitHub Team, the cheapest plan with a price on GitHub's pricing page that publishes from a private repository. GitHub Pro does too, and the pricing page doesn't list its price. Private publishing needs Enterprise, $21 per user a month. Whether Pages builds draw on the plan's Actions allowance, GitHub's docs disagree.
Can I use a custom domain with GitHub Pages from a private repo?
Yes. GitHub Pages takes a subdomain such as www.example.com or an apex domain such as example.com, whether the repository is public or private. If the site is unpublished later, for example after a downgrade, the domain is “at risk of a domain takeover,” so GitHub recommends verifying it first.
What happens to my GitHub Pages site if I downgrade from Pro to Free?
GitHub unpublishes it. GitHub's docs say “any GitHub Pages sites that are currently published from private repositories in your account will be unpublished.” Before you downgrade, remove or update the custom domain's DNS records, or make the repository public to keep the site.
Can a github.io site be private?
No, not at github.io. A privately published site lives at a different subdomain under *.pages.github.io, or at your custom domain, and only an organization on GitHub Enterprise Cloud can publish one. Only “people with read access to the repository” can open it.
Can I password protect a GitHub Pages site?
No. GitHub's Pages docs read for this page describe no password setting, and the limits doc says Pages sites “shouldn't be used for sensitive transactions like sending passwords or credit card numbers.” The only access control is Enterprise Cloud's private publishing, which checks a GitHub account, not a password.
Do GitHub Pages builds from a private repo use Actions minutes?
GitHub's docs disagree. Every Pages site deploys with a GitHub Actions workflow, and the creating-a-site doc says “For private and internal repositories, usage charges apply after the included compute usage for your plan is consumed.” GitHub's Actions billing doc says standard GitHub-hosted runners are free “For GitHub Pages,” with no exception for private repositories.
What happens if I make my GitHub Pages repository private on GitHub Free?
GitHub unpublishes the site. Its repository visibility doc says that on GitHub Free, after the change to private, “Any published GitHub Pages site will be automatically unpublished.” If the site had a custom domain, GitHub says to remove or update the DNS records first.
Sources
Each source was read on November 1, 2026 (JST). Dates in parentheses are the document's own; GitHub's docs show none.
- Creating a GitHub Pages site (GitHub Docs) (no date on the page)
- Changing the visibility of your GitHub Pages site (GitHub Docs) (no date on the page)
- GitHub's plans (GitHub Docs) (no date on the page)
- GitHub pricing (no date on the page; read November 1, 2026)
- GitHub Pages limits (GitHub Docs) and its Enterprise Cloud version (no date on the page)
- About custom domains and GitHub Pages (GitHub Docs) (no date on the page)
- Downgrading your account's plan (GitHub Docs) (no date on the page)
- Setting repository visibility (GitHub Docs) (no date on the page)
- Transferring a repository (GitHub Docs) (no date on the page)
- About repositories (GitHub Docs) (no date on the page)
- GitHub Actions billing (GitHub Docs) (no date on the page)
- Cloudflare Pages Git integration (last updated April 21, 2026) and preview deployments (last updated October 12, 2026)
- Cloudflare One setup (last updated October 12, 2026)
- Netlify Password Protection docs (last updated October 7, 2026) and Netlify pricing (read November 1, 2026)
- Vercel Git deployments (last updated September 18, 2026), Deployment Protection and Password Protection (both last updated September 15, 2026)
- GitLab Pages, GitLab Pages access control, and GitLab pricing (read November 1, 2026)
Next step
How to share an HTML file as a link that opens on any phone
Email and Google Drive open HTML on a phone without scripts. Compare 5 hosts (Netlify Drop, Tiiny Host, Pagelive, GitHub Pages, Convika) and follow 4 steps.
Related articles
- Can you use GitHub Pages for a commercial or business site?GitHub Pages bans e-commerce and SaaS, and business landing pages are a gray area. See what the 2026 terms allow and free hosts without a business rule.
- GitHub Pages limits: storage, bandwidth, builds. What happens when you pass them?GitHub Pages sites can be 1 GB, with soft limits of 100 GB of bandwidth a month and 10 builds an hour. What GitHub's docs say happens past each limit.
- GitHub Pages alternatives for a one-page site (no git needed)Netlify, Cloudflare Pages, Vercel, Tiiny Host, Carrd, and Convika compared with GitHub Pages on git, forms, passwords, custom domains, and commercial use.
- How to password protect an HTML page without code, on your own domainJavaScript passwords sit in the page code. Put an HTML page from ChatGPT or Claude behind a server-checked password on your own domain.
- How to get a client's feedback on a website you built with AIWalk a client through your AI-built draft on a call or send a review link, collect feedback for your AI, and publish each round at the same address.
- Is Netlify free? What the Free plan's 300 credits cover in 2026Netlify's $0 plan gives 300 credits a month (15 per deploy, 20 per GB) and allows commercial projects. See how long 300 credits last for 1 HTML page.