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:
| Capability | Provided |
|---|---|
| Build from a git repo | Detect framework, run build, deploy artifact |
| Global CDN delivery | Edge POPs in 100+ locations |
| Preview deploys per PR | Unique URL for every branch / commit |
| HTTPS / domain management | Free certs, custom domains, redirects |
| Environment variables | Per-environment config |
| Edge functions | Run code per request at the edge — see Edge Functions |
| Form handling | Forms without a backend |
| Analytics | Page views, performance metrics |
| Image optimization | Resize / format conversion on the fly |
| Image storage / database | Some 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
| Platform | Notes |
|---|---|
| Vercel | Creator of Next.js; closely tied; expensive at scale but excellent DX |
| Netlify | Pioneer; framework-agnostic; less Next.js-specific |
| Cloudflare Pages | Tied to Cloudflare ecosystem; cheap egress; Workers integration |
| GitHub Pages | Free; basic static; no edge functions; good for OSS docs |
| GitLab Pages | Same idea, GitLab-side |
| AWS Amplify Hosting | AWS-native; less polished DX |
| Render | Includes static + backend hosting; simpler pricing |
| Fly.io | Container-first but supports static |
| Coolify / Dokploy / Self-host | Open-source alternatives |
| Surge.sh | Old-school, simple, CLI-driven |
For new projects in 2026:
- Next.js heavy → Vercel (best integration) or Cloudflare Pages (cheaper).
- Framework-agnostic, simple pricing → Netlify or Cloudflare Pages.
- OSS / docs site, free → GitHub Pages or Cloudflare Pages.
- Self-host requirement → Coolify 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 rollbackThe 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:
| Framework | Notes |
|---|---|
| Next.js | Vercel's home turf; works everywhere; SSR/SSG/ISR/Edge |
| Astro | Static-first; integrations for all platforms |
| SvelteKit | Adapters per platform (vercel, netlify, cloudflare) |
| Remix | Vercel + Netlify + Cloudflare adapters |
| Nuxt | Same |
| Solid Start / Qwik / Fresh | Newer; 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
1. Getting Started
Deploy a Next.js site to Cloudflare Pages with one git push - custom domain, preview URLs, env vars
2. Patterns
Static vs SSR vs ISR, environment variables, preview environments, edge functions, image optimization
3. Best Practices
Build optimization, performance, observability, cost, common pitfalls
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.
| Tier | Vercel | Netlify | Cloudflare Pages |
|---|---|---|---|
| Free | 100 GB/month bandwidth | 100 GB/month | Unlimited bandwidth |
| Pro (~$20/user) | 1 TB | 1 TB | + Workers usage |
| Bandwidth overage | $40/TB | $55/TB | Free egress |
| Edge function invocations | Per-call pricing | Per-call pricing | Included 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.