Steven's Knowledge

Static Site Hosting

Cloudflare Pages, Vercel, Netlify - host modern frontends with edge CDN, preview deploys, and integrated edge functions

Static Site Hosting

For the last decade, "deploying a website" has moved from "rent a VM, run nginx" to "push to git, your platform takes care of the rest." Static site hosts handle building, deploying to global edge, preview environments per pull request, environment variables, edge functions, and SSL — all for free at small scale.

This is distinct from Object Storage + CDN (you assemble the pieces) — static hosts are the opinionated platform version.

What "Static Site Hosting" Means Now

The term is misleading — modern "static" hosts also run server-side code at the edge:

CapabilityProvided
Build from a git repoDetect framework, run build, deploy artifact
Global CDN deliveryEdge POPs in 100+ locations
Preview deploys per PRUnique URL for every branch / commit
HTTPS / domain managementFree certs, custom domains, redirects
Environment variablesPer-environment config
Edge functionsRun code per request at the edge — see Edge Functions
Form handlingForms without a backend
AnalyticsPage views, performance metrics
Image optimizationResize / format conversion on the fly
Image storage / databaseSome platforms include simple storage (Vercel Blob, Cloudflare R2/KV/D1)

A modern "static" host is closer to a frontend platform — you build a Next.js / SvelteKit / Nuxt / Astro site and it deploys with the right runtime split between static, edge, and serverless.

The Players

PlatformNotes
VercelCreator of Next.js; closely tied; expensive at scale but excellent DX
NetlifyPioneer; framework-agnostic; less Next.js-specific
Cloudflare PagesTied to Cloudflare ecosystem; cheap egress; Workers integration
GitHub PagesFree; basic static; no edge functions; good for OSS docs
GitLab PagesSame idea, GitLab-side
AWS Amplify HostingAWS-native; less polished DX
RenderIncludes static + backend hosting; simpler pricing
Fly.ioContainer-first but supports static
Coolify / Dokploy / Self-hostOpen-source alternatives
Surge.shOld-school, simple, CLI-driven

For new projects in 2026:

  • Next.js heavyVercel (best integration) or Cloudflare Pages (cheaper).
  • Framework-agnostic, simple pricingNetlify or Cloudflare Pages.
  • OSS / docs site, freeGitHub Pages or Cloudflare Pages.
  • Self-host requirementCoolify or plain CDN + Object Storage.

What You Get Out of the Box

Push to git:

git push origin main


Platform detects framework (Next.js, Nuxt, Astro, ...)


Builds in a CI environment (yarn, pnpm, npm — auto-detected)


Deploys static assets to global CDN
Deploys server functions to edge / serverless runtime


Atomic activation: new URL serves new version; old version available for rollback

The default state for a new project is a free site, on a .vercel.app / .pages.dev / .netlify.app subdomain, with HTTPS, auto-deploying from main.

Preview Deploys (The Real Magic)

Open a PR → platform builds it → unique URL pointing at that branch's build.

main         → https://myapp.com (production)
PR #42       → https://myapp-pr-42.vercel.app (preview)
feature/foo  → https://feature-foo-myapp.vercel.app (preview)

This single feature transformed frontend dev. Designers and PMs can review changes in a real browser before merge.

Some platforms (Vercel, Netlify) post the preview URL as a PR comment automatically.

Frontend Framework Conventions

Most modern frameworks integrate with these platforms:

FrameworkNotes
Next.jsVercel's home turf; works everywhere; SSR/SSG/ISR/Edge
AstroStatic-first; integrations for all platforms
SvelteKitAdapters per platform (vercel, netlify, cloudflare)
RemixVercel + Netlify + Cloudflare adapters
NuxtSame
Solid Start / Qwik / FreshNewer; all support major platforms
Plain Vite / Webpack / Parcel"Static export" → upload dist/

The frameworks know how to compile for each platform's runtime (Vercel's Lambda, Cloudflare Workers, Netlify Functions). You don't write platform-specific code in most cases.

Learning Path

When NOT to Use a Static Host

Honest cases:

  • Backend-heavy app with significant Node/Python/Go service work — a static host's serverless functions get pricey or limited. Use Render, Fly, Railway, or proper Kubernetes.
  • Stateful workloads (databases, queues, WebSocket servers) — static hosts don't do this.
  • Strict data residency that platforms don't support.
  • Need full Linux container — Render / Fly / your own infra.

For pure frontend + small API endpoints, static hosts win. For "I have a real backend service," look at full-stack platforms or PaaS.

Cost Considerations

The free tiers are generous; the scaling cost can surprise.

TierVercelNetlifyCloudflare Pages
Free100 GB/month bandwidth100 GB/monthUnlimited bandwidth
Pro (~$20/user)1 TB1 TB+ Workers usage
Bandwidth overage$40/TB$55/TBFree egress
Edge function invocationsPer-call pricingPer-call pricingIncluded up to 100K/day free

Cloudflare Pages has free egress — the biggest cost item for high-traffic sites. Vercel's "fast pretty" comes at a premium.

For mid-scale sites: Cloudflare Pages is dramatically cheaper if you're not deep in Vercel-specific features.

Static site hosts are an evolution of CDN and Edge Functions — they package both with a built-in CI/CD pipeline. For pure full-control deployments, you can replicate the experience with Object Storage + CDN + a CI pipeline, but the platform value is real.

On this page