By · Founder, Stacktree · Last updated
alternative

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.

Get started free

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

  1. Export your Pages site as a folder of static HTML (any modern build does this).
  2. Upload via the dashboard, or curl -F file=@site.zip https://api.stacktr.ee/sites.
  3. Set a slug, password, or email gate.
  4. 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.
FAQ

Frequent questions

Can GitHub Pages host private sites? +
Only on GitHub Enterprise Cloud with the "private Pages" feature, which gates access to your organisation's GitHub users. There is no public-tier private Pages option, and the unit of access is "GitHub seats," not "anyone with the link."
Why use a private GitHub Pages alternative? +
Three common reasons: (1) you want a private link without forcing viewers to log into GitHub; (2) you want it published in ~200 ms instead of waiting for a Pages build; (3) you want an AI agent to publish directly via an MCP tool call rather than committing and pushing.
Does Stacktree replace the GitHub Pages workflow entirely? +
No. If you have a static documentation site that everyone in the world should read, GitHub Pages remains a great fit. Stacktree is for the artifact-shaped half of the work: spec docs, PR writeups, status reports, agent-emitted HTML — short-lived or team-private outputs that should never have been a repo.
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? +
Yes. Run 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? +
You'll lose the github.io subdomain authority unless you bring your own custom domain. If you currently use a custom domain on Pages, point its DNS at Stacktree (Pro plan, Cloudflare for SaaS) and SEO continuity is preserved.
Keep reading

Related guides

References

Sources and further reading

Stop committing one-off HTML to a repo.

Free to start. Anonymous first publish lives 24 h, no card required.

Sign up free →