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.

Host my page for free

Free plan: no credit card, 1 published page. A private link or a password needs Pro.

On this page

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 planPrice on GitHub's pricing pagePages from a private repositoryWho 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 accountNot listed on the pricing pageYes (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 CloudEnterprise: $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 UsersEnterprise: $21 per user a month (pricing)Yes, from organization repositories onlyEnterprise 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 changesWhat GitHub's docs say happens to the siteSource
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 PagesDowngrading 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 accountIt loses “features like protected branches and GitHub Pages”Transferring a repository
An Enterprise Cloud organization leaves Enterprise Cloud with a privately published siteGitHub doesn't sayThe 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

HostPrivate source on the free planKeeping visitors outWhat that costs
GitHub PagesNo 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 PagesYes: “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 FreePrivate 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 HobbyNot 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 FreeYes: 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)
ConvikaNo repository: you upload the page's HTML file or paste its codeFree: 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.

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

Compare with other hosts

Share this article

Share one page with only the people you choose

Upload the page's HTML file or paste its code. There is no repository to make public, and on Pro the page can be a private link or need a password.

Host my page for free

Free plan: no credit card, 1 published page. A private link or a password needs Pro.