How to make GitHub Pages private (and when to use an alternative instead).
GitHub Pages is public-by-default on every tier except Enterprise Cloud. This page covers the official private-Pages path, why most teams skip it, and a private-by-default alternative that ships in 200 ms with no GitHub seats.
Can GitHub Pages be private?
Only on GitHub Enterprise Cloud, using the "change visibility" setting. That option gates access to verified members of your organisation on GitHub, so every viewer needs a GitHub seat. There is no private-Pages option on Free, Pro, or Team plans, and there is no way to share a Pages site with someone who is not a GitHub user.
What is a private GitHub Pages alternative?
A private GitHub Pages alternative is a static-HTML host that gives you the simplicity of Pages (drop a file, get a URL) but with private-by-default access and an API or MCP tool agents can call directly. Stacktree fits this brief: every link is unguessable by default, the publish is a single tool call, and the URL stays stable when the agent revises the content.
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, optional password, optional email-domain gate. Pages has zero of the latter two.
- 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, password, or email gate.
- Point your custom domain (Pro) at Stacktree via Cloudflare for SaaS.
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. | Pro: Cloudflare for SaaS. |
| Best for | Long-lived public docs alongside source. | Short-lived or private artifacts. |
Frequent questions
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 on Pro.Can the agent push directly? +
npx stacktree-install — it 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
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 — Enterprise Cloud only.
- Cloudflare for SaaS — custom hostnames ↗ How Stacktree provisions Pro-plan custom domains.
- Model Context Protocol — spec ↗ The protocol agents use to call publish_html directly.
Stop committing one-off HTML to a repo.
Free to start. Anonymous first publish lives 24 h, no card required.
Sign up free →