A private repo does not make your Pages site private.
GitHub serves Pages publicly by default even when the repository behind it is private, and the URL is predictable from your account and repo name. Here is the one supported way to publish privately, what it costs you in practice, and what to do when the person who needs to read it is a client rather than a colleague.
No card. 3 free pages, each live for 7 days. Client work that must outlive the week is Solo, $19
What your client sees
Brand & marketing audit
open exampleFindings, perception map, score dial — one navigable page.
Live page →Performance report
open exampleThe monthly numbers, sent as a link that updates in place.
Live page →Passcode-gated review
passcode: demoType what your client would type and see the styled gate.
Live page →Can GitHub Pages be private?
Only on GitHub Enterprise Cloud. Everywhere else the site is public, and the fact that catches most people out is this: a private repository does not make its Pages site private. GitHub’s own documentation says Pages sites are publicly available on the internet by default, even when the repository behind them is private or internal. Private publishing exists on Enterprise Cloud, and a privately published site is then readable only by people with read access to the repository — so your viewer still needs a GitHub account.
A private repo does not give you a private site
This is the misunderstanding worth clearing first, because it is the one that leaks documents. Repository visibility and Pages visibility are separate settings. You can mark a repository private, deploy Pages from it, and still be serving that site to anyone on the internet who finds the URL. GitHub states it plainly in the Pages visibility documentation: unless your enterprise uses Enterprise Managed Users, sites are publicly available by default even when the repository is private or internal.
And you cannot fall back on the URL being hard to guess, because Pages URLs are not obscure by
design — they are derived from the account and repository name, in the shape
username.github.io/repository. Anyone who knows both knows the address.
The one supported way to make it private
Publish the site privately, which requires GitHub Enterprise Cloud. Access control for Pages then restricts the site to people with read access to the source repository. That is a real feature and it works, with two consequences worth understanding before you plan around it:
- Every viewer needs a GitHub account with repository access. The unit of access is a GitHub identity, not a link. A client, a contractor without a seat, or a colleague in another company cannot open it.
- On Enterprise Managed Users it flips the other way. Pages sites can then only be published as private, and only to other members of the enterprise.
So the honest summary: GitHub Pages privacy is organisation-shaped. It answers “only my colleagues should see this” well, and answers “only this one person outside my company should see this” not at all.
What people usually actually want
Reading the question as it is normally asked — a page that should not be public, sent to somebody specific — there are three workable answers, and only one of them is GitHub.
- Your viewers are all in your org and you are on Enterprise Cloud. Use private Pages. It is built for exactly this and nothing here beats it.
- Your viewers are colleagues but you are not on Enterprise Cloud. Pages cannot do it. Put the site behind any host that supports a password or an SSO gate.
- Your viewer is a client, or anyone who should not need a GitHub account. You want a link that is unguessable, optionally gated, and openable in a browser by someone who has never heard of your repo.
Plain disclosure, since this is our own site and that third case is what we sell: Stacktree gives every page an unguessable URL by default on every plan including the free one, with a passcode or a company-email-domain gate available on paid plans, and no account for whoever opens it. Where GitHub Pages is the better answer, the list above says so.
What GitHub Pages gets right
GitHub Pages is excellent at one specific shape of work: long-lived, public-facing static sites that live next to their source code. If you're publishing documentation for an open-source project, the Pages + Jekyll/Hugo combo is hard to beat.
What it doesn't fit
Almost everything else in the modern agent-and-AI workflow:
- Private artifacts. "Private Pages" requires GitHub Enterprise Cloud and only gates to GitHub users on the org, not "anyone with the link."
- Agent emissions. Pages can't be the target of a tool call without a commit + push round-trip. Every iteration is a new commit, every commit triggers a rebuild, every rebuild adds latency.
- Stable URLs across iterations. Pages serves whatever's at HEAD. Replace-in-place semantics require careful branch hygiene.
- Short-lived outputs. A 24-hour PR review link doesn't need a repo, a workflow, or a branch.
How Stacktree differs
- Private by default. Every URL is unguessable; no Git-host log-in dance for viewers.
- 200 ms publish. No CI, no rebuild: the HTML is live by the time the API call returns.
- Replace-in-place. The same URL survives across every revision via
update_site. - MCP-native. Agents publish via tool call:
publish_html({ file: "spec.html" }). - Three gating layers. Unguessable URL on every plan, plus an optional password and email-domain gate from Solo at $19 a month. Pages has zero of the latter two, at any price.
- Optional E2E encryption. AES-GCM in the browser, key in URL fragment; the server stores ciphertext only.
Migration in five minutes
- Export your Pages site as a folder of static HTML (any modern build does this).
- Upload via the dashboard, or
curl -F file=@site.zip https://api.stacktr.ee/sites. - Set a slug, and a password or email gate if the plan includes them.
- Point your custom domain (Solo and above) at Stacktree via Cloudflare for SaaS.
If the viewers are clients, not colleagues
GitHub’s private path assumes the viewer is inside your org. A client is not, and never will be: no seat, no login, and no reason to get one. If the people opening the page are clients rather than colleagues, the shape of the problem changes, and so does the answer. That handoff has its own page: share an HTML file with a client, as a link they just open.
Stacktree vs. GitHub Pages (private)
| Criterion | GitHub Pages | Stacktree |
|---|---|---|
| Private by default | No: Enterprise Cloud only, gates to GH users. | Yes: unguessable URL on every plan. |
| Viewer needs a login | Yes: GitHub account in the org. | No: link is the credential. |
| Publish latency | 30 s – 5 min Pages build. | ~200 ms via API. |
| Same URL across revisions | Yes (HEAD), but requires Git discipline. | Yes: update_site, no Git involved. |
| Agent-callable | Indirectly: agent must commit & push. | Directly via MCP tool call. |
| CSP / security defaults | You bring your own CSP. | Sensible defaults, customisable. |
| Custom domain | Free with DNS + Pages settings. | From Solo, $19/mo: Cloudflare for SaaS. |
| Best for | Long-lived public docs alongside source. | Short-lived or private artifacts. |
Frequent questions
If my repository is private, is my GitHub Pages site private? +
Can GitHub Pages host private sites? +
Why use a private GitHub Pages alternative? +
Does Stacktree replace the GitHub Pages workflow entirely? +
How are URLs structured? +
stacktr.ee/p/<unguessable-token> for unlisted publishes, <slug>.stacktr.ee for slugged publishes, or your own domain via Cloudflare for SaaS from Solo at $19 a month.Can the agent push directly? +
npx stacktree-install, which covers Claude Code, Cursor, Codex, OpenCode and Amp. The agent then calls publish_html with the file path; no commit, no push, no Pages build.Will my old GitHub Pages SEO transfer? +
Related guides
- Share a deliverable with a client, on a private link Send clients a report, prototype, dashboard, or AI-made HTML page as a private.
- Private HTML hosting What private-by-default means and why the link is the credential.
- Best private HTML hosting 7 tools compared, GitHub Pages among them.
- Share finished work with a client A private link a client opens in any browser, no login.
- Tiiny Host alternative The drag-and-drop side of the market, compared.
- Publish from Claude Code How Claude Code users replace their GH Pages habit.
- Agent-loop hosting Why replace-in-place beats commit-and-rebuild.
Sources and further reading
- GitHub Pages: official docs ↗ Canonical documentation for the product this page compares against.
- GitHub Pages: private visibility (Enterprise) ↗ The only path to private Pages, on Enterprise Cloud only.
- Cloudflare for SaaS: custom hostnames ↗ How Stacktree provisions custom domains on the paid plans.
- Model Context Protocol: spec ↗ The protocol agents use to call publish_html directly.
Send the deliverable as a private link
Anonymous first publish lives 24 h, no card required. Flat $19 a month after that, and viewers are never seats.
Sign up free →