By · Founder, Stacktree · Last updated
comparison

GitHub Pages vs Vercel: which to use in 2026

GitHub Pages is free static hosting served straight from a repository. Vercel is a full application platform with build pipelines and serverless functions. They overlap on the simple case and diverge fast once you need dynamic behavior or access control. Here is a fair read on both, plus the case where neither is the right shape.

Get started free

GitHub Pages vs Vercel: what is the difference?

GitHub Pages publishes static files from a Git repo for free, with custom domains and HTTPS but no server runtime. Vercel deploys the same static output and adds preview builds, serverless functions, and team features on a per-seat paid plan. Choose Pages for plain static sites, Vercel when you expect dynamic features.

Hosting model: repo-served pages vs an app platform

GitHub Pages takes a branch or a built output folder from a repository and serves it as a website. The mental model is a folder of files mapped to a URL. There is no project dashboard separate from the repo, no runtime, and no configuration beyond a settings panel and an optional Jekyll build. That simplicity is the point: if your code already lives on GitHub, turning on Pages is a few clicks.

Vercel is an application platform. A deployment is a build of your project that can include static pages, server-rendered routes, edge logic, and serverless functions. Vercel optimizes for frameworks like Next.js, Astro, SvelteKit, and Remix, gives every push a unique preview URL, and treats the project, not the repo, as the unit you manage. You get the same static hosting Pages offers, wrapped in a build and deploy pipeline with more moving parts.

Build and deploy

GitHub Pages can publish a static folder directly, run a Jekyll build, or accept output from a GitHub Actions workflow you configure yourself. Deploys are tied to a branch. For a hand-written static site this is clean. For a modern framework you end up writing and maintaining the Actions workflow.

Vercel detects your framework, runs the build for you, and ships a preview deployment for every commit and pull request before you promote to production. Build caching and instant rollbacks are first-class. This is where Vercel genuinely wins: the deploy experience for framework projects is faster to set up and gives reviewers a live link per change without extra configuration.

Dynamic capability

This is the clearest split. GitHub Pages is static only. It serves HTML, CSS, and client-side JavaScript, and that is the whole runtime. There are no API routes, no server-side rendering, and no database. Anything dynamic has to call an external service from the browser.

Vercel runs serverless and edge functions, supports server-side rendering, and provisions storage and other backend services from the CLI. If your site needs form handling, authentication, API endpoints, or rendering per request, Vercel can do it in the same project. For genuinely dynamic apps, Pages is not a contender and Vercel is the stronger choice.

Custom domains

Both support custom domains with automatic HTTPS. GitHub Pages lets you point an apex or subdomain at your site and provisions a TLS certificate at no cost. Vercel supports custom domains with managed certificates on every plan, including the free Hobby tier. Setup on either side is a DNS change plus a verification step. Neither has a meaningful edge here.

Pricing model

GitHub Pages is free for public sites within published usage limits (soft caps on storage, bandwidth, and build frequency). For most personal and open-source projects you never pay for Pages specifically.

Vercel offers a free Hobby plan limited to personal, non-commercial use, with builds, custom domains, and functions inside monthly usage limits. Commercial work and team collaboration move you to Pro, which starts at $20 per month per deploying seat (with $20 of included usage credit), plus usage-based charges for bandwidth and compute beyond the included allowances. The cost model is the main thing to weigh: Pages stays free for the static case, while Vercel scales with seats and usage.

Private access and access control

Both are weak here, and it is worth being precise. A private GitHub repository keeps your source code private, but a published Pages site is still public on the internet on Free, Pro, and Team plans. Private Pages, where a project site is restricted to people with repository read access, exists only on GitHub Enterprise Cloud. So a private repo does not give you a private site for most accounts.

Vercel can put deployment protection in front of a site: Vercel Authentication on all plans, and password protection as a paid add-on on Pro. Those controls are designed for previews and team environments, not for handing a single private link to one outside recipient. If your core requirement is "this URL should only be seen by the people I choose," neither platform is built around that.

Best-for, at a glance

  • GitHub Pages: documentation sites, project pages, blogs, and hand-built static sites where the code already lives in a public repo and you want zero hosting cost.
  • Vercel: framework-based sites and apps that need preview deploys, fast builds, server-side rendering, or serverless functions, and where a team is collaborating on the project.

Side by side

Criterion GitHub Pages Vercel Stacktree
Hosting model Static files served from a Git repo App platform with build and deploy pipeline Direct HTML publish, no repo or project
How you ship Git push to a branch (optional Actions build) Git push, auto build, preview per commit An agent tool call (publish_html) or upload
Dynamic capability Static only, no server runtime Serverless and edge functions, SSR Static HTML only (no serverless backends)
Custom domains Yes, free, with HTTPS Yes, on every plan, managed TLS Yes, on Pro (Cloudflare for SaaS)
Pricing model Free within usage limits Free Hobby, then per-seat Pro plus usage Flat workspace: Free, Pro, Agent. Never per-seat
Private by default No (Enterprise Cloud only for private sites) No (deployment protection on paid plans) Yes, unguessable URL plus optional gates
Best for Public static sites and docs Framework apps needing builds and functions Private, one-off artifacts agents emit

The third option: when neither shape fits

GitHub Pages and Vercel both assume a Git workflow and, by default, public delivery. That is the right fit for a site you maintain over time. It is the wrong fit for a different and increasingly common thing: a private, one-off artifact, a report, a dashboard, a prototype, a generated document, that an AI agent just produced and that you want to send to one or two people without it becoming a repository or a tracked project.

Stacktree is built for that gap. It is private-by-default HTML hosting where every URL is unguessable, so the link itself is the credential. There is no repo to create and no build to configure. An agent calls publish_html over MCP from Claude Code, Cursor, Codex, or Claude.ai and gets back a live link, and update_site replaces the content in place so the URL stays stable across iterations. See how agents publish HTML over MCP and the agent loop hosting pattern.

On access control, where both platforms are thin, Stacktree layers an unguessable URL, an optional shared password, an optional email-domain gate verified by magic link, and optional end-to-end encryption where the server only ever sees ciphertext. The first publish is anonymous and lasts 24 hours with no account. Pricing is a flat workspace plan (Free at $0, Pro at $8/mo, Agent at $19/mo), never per-seat, and you can self-host the source-available stack on your own Cloudflare.

To keep this fair: Stacktree is not trying to replace either tool on its home turf. It hosts static HTML only, so it is not an app platform like Vercel, and it is not built for long-lived public marketing sites the way Pages is. There is no in-browser live editor, and workspace-wide SSO is on the roadmap (a per-link email-domain gate covers most cases today). If you want a public site you maintain over time, use Pages or Vercel. If you want a private link for something an agent made, that is the case Stacktree is shaped around. More context on the private GitHub Pages alternative and the broader static app alternative.

FAQ

Frequent questions

Is GitHub Pages or Vercel better for a static site? +
Both serve static files well. GitHub Pages is simpler and free when your code already lives in a public repo. Vercel adds preview deploys, faster framework builds, and a path to serverless functions later. Pick Pages for plain static, Vercel when you expect dynamic features or team review.
Can GitHub Pages host a private site? +
Only on GitHub Enterprise Cloud, where access control restricts a project site to people with read access to the repository. On Free, Pro, and Team plans, a published Pages site is public on the internet even when the source repo is private. For most accounts, Pages has no viewer gate.
Is Vercel free? What does the Hobby plan cover? +
Vercel Hobby is free and limited to non-commercial, personal use. It includes builds, custom domains, and serverless functions within monthly usage limits. Commercial work and team collaboration move you to Pro, which is a per-seat monthly plan starting at $20 per deploying member plus usage.
Can GitHub Pages run server-side code? +
No. GitHub Pages serves static HTML, CSS, and JavaScript only, with an optional Jekyll build. There is no server runtime, no API routes, and no database. If you need server-side rendering or backend endpoints, Vercel functions or another app platform is the right tool.
Do both support custom domains and HTTPS? +
Yes. GitHub Pages supports custom domains with automatic HTTPS at no cost. Vercel supports custom domains with managed TLS on every plan, including the free Hobby tier. Setup on both is a DNS change plus verification, so neither has a real advantage here.
When does neither GitHub Pages nor Vercel fit? +
When the thing you are publishing is a private, one-off artifact, a report, a prototype, an export, that should not become a repository or a tracked project. Both platforms assume a Git workflow and public delivery. A private-by-default link host fits that case better.
Keep reading

Related guides

References

Sources and further reading

Publishing something an agent made?

Skip the repo and the build. Get a private, unguessable link in one tool call, and replace it in place as you iterate.

Sign up free →