Static hosting is the easiest thing in infrastructure to do adequately and a surprisingly easy thing to do badly. Every platform here will serve your files over TLS from a global network and none of them will fall over. On the day you pick one, they are indistinguishable.
The differences show up later, and always in the same five places. Your build starts taking too long and you find out what a build minute costs. Your traffic grows or a scraper finds you, and you find out what bandwidth costs beyond the included allowance. You need a redirect for a page you moved, a header for a security policy, or a proxy rule to put an API under the same origin, and you find out whether that configuration lives in your repository or in a dashboard. Somebody opens a pull request and you find out whether previews are automatic. And you add a domain, or a hundred customer domains, and you find out how certificates are issued and renewed.
None of those five are on a feature comparison because every platform ticks all of them. The question is always the shape, not the presence. Does the redirect file support proxying to another origin. Do build minutes reset monthly or roll. Is the certificate for a customer domain automatic at scale or a support ticket each time.
Underneath all of it sits the thing that determines whether your static site is actually fast: cache headers. A static site served with wrong cache headers is a dynamic site with extra steps, and it will cost you bandwidth you did not need to spend. So that comes first.
Key takeaways
- Build minutes are consumed by pull request activity, not user traffic, so an active repository can exhaust them while serving almost nobody. Fix caching before buying more minutes.
- Bandwidth allowances and overage behaviour differ more than headline prices do. The question to ask is whether the platform hard-stops, throttles, or bills automatically at the limit.
- Redirect and header configuration in a repository file is meaningfully better than a dashboard, because these encode business logic and a wrong redirect is an SEO incident.
- Custom domain certificates are easy for ten domains and a genuine product feature for a thousand. If you host customer domains, ask specifically about issuance and renewal at scale.
HTTP caching semantics: the standard underneath, not a product
Cache-Control, ETag, Last-Modified and the revalidation rules are a specification, not a feature any of these vendors invented. Every platform below implements the same standard, and almost every complaint about a static host being slow or expensive is actually a misconfiguration of it. It has no vendor, no pricing and no dashboard, so it belongs in front of the product comparison rather than inside it.
What it gives you
- A way to say an asset never changes, so a browser and every cache in between stop asking for it at all
- Content-hashed filenames plus a long max-age is the canonical pattern: immutable assets cached forever, and a new deploy produces new filenames rather than requiring an invalidation
stale-while-revalidatelets a cache serve a slightly old response immediately and refresh in the background, which converts a latency problem into a freshness tradeoff you control- ETag and conditional requests turn a repeat fetch into a small not-modified response instead of the whole payload
s-maxagelets you tell the CDN something different from the browser, which is how you get long edge caching with short client caching
What it does not do
- It does not purge anything. Invalidating already-cached content is a vendor-specific operation with vendor-specific limits and latency, and this is where platforms genuinely differ
- It does not protect you from cache key mistakes. A query string or a varying header in the cache key fragments your cache and quietly multiplies your origin traffic
- It says nothing about what a CDN does with your rules at the edge, including whether it honours
stale-while-revalidateat all - It cannot fix a site that hashes nothing. If your HTML references unhashed asset filenames, you are choosing between stale assets and no caching
The practical rule for any static site: hashed assets get a very long max-age and
immutable. HTML gets a short or zero max-age with revalidation, because the HTML is what
points at the new hashes. Get that pair right and most of the performance and bandwidth
conversation disappears. The broader treatment of edge caching behaviour is in
CDN providers.
The five things that actually differ
Build minutes. Every platform includes some and they are consumed per build across every branch. The variable that moves this is pull request activity, not traffic. Two things control it: whether the platform caches dependencies and build artefacts between runs, and whether your build is incremental. On a monorepo, neither is true by default, which is why build caching tools and monorepo build tools belong in this budget.
Bandwidth at scale. Included allowances are generous for a small site and the question is what happens past them. Hard stop, throttle, or automatic billing. Only the first is safe by default, and only the third has no ceiling. Set a budget alert before you need one.
Redirect, rewrite and header configuration. The capability spread here is wider than anywhere else on this list. At minimum you want path redirects with status codes. What separates platforms is splat and placeholder matching, country or language-based rules, proxy rewrites to another origin so you can put an API under the same domain, and per-path header rules for your content security policy. Configuration in a repository file beats a dashboard, because these rules are business logic and belong in review.
Preview deployments. A URL per pull request, ideally commented on the pull request automatically. The details that matter: whether preview URLs are guessable, whether they are indexed by search engines, and how long they live. A public preview of unreleased content that got indexed is a real and recurring incident.
Custom domains and certificates. For your own handful of domains this is automatic everywhere and not worth comparing. For customer-supplied domains, which is the SaaS case, it becomes a product feature: automatic issuance on domain verification, automatic renewal, handling of apex domains, and whether there is a ceiling on the number of domains. Ask about the ceiling explicitly.
Needs first-hand data: Deploy the same repository, a documentation site with a meaningful dependency tree, to each platform. Record cold build time with no cache, warm build time with cache, and the time from git push to the new content being served from the edge in a distant region. The last measurement is the one users experience and the one nobody publishes.
Cloudflare Pages

Cloudflare Pages is static hosting attached to the network Cloudflare already runs for everything else. Assets are served from the same points of presence as its CDN and DNS, and dynamic behaviour is added as functions running in isolates on the same network. Because serving bandwidth is the core business rather than a resold cost, its economics at scale differ structurally from platforms built on top of someone else’s cloud.
Pros
- Bandwidth economics are in a different category from platforms reselling cloud egress, which is the entire argument at scale
- The same account gives you DNS, a firewall, caching rules and compute, so there is no seam between your host and your network layer
- Redirect and header files in the repository, plus full CDN cache rule control for anything the files cannot express
- Functions in the same network mean dynamic behaviour does not require sending the request to another provider
Cons
- The surrounding configuration surface is large, and it is genuinely possible to have a caching rule at the zone level fight your header file
- The function runtime is web-standard rather than Node, so dynamic additions are constrained in ways that surprise Node developers
- Build system is capable rather than refined, and build debugging is less pleasant than on the specialists
Best for: Sites where bandwidth is or will be the dominant cost, and teams who want hosting, DNS and CDN controls in one place.
Pricing: Per-seat tiers with build and request allowances, with static asset bandwidth effectively absorbed into the network rather than metered as a separate line.
Netlify

Netlify defined this category and the configuration ergonomics still show it. Deploys are atomic, rollback is instant, and the redirect and header language in its repository configuration file is the most expressive in this comparison, including splats, placeholders, country conditions and proxy rewrites to other origins. If your requirements include non-trivial routing rules, this is the platform that already has the feature.
Pros
- The most capable redirect and rewrite language here, including proxy rules that let an external API live under your own domain
- Atomic deploys with instant rollback to any previous deploy make a bad release a non-event
- Preview deployments and pull request integration are polished and require no configuration
- Framework-agnostic, so the build output stays portable and migrating away later is mechanical
Cons
- Bandwidth and build minutes are both metered with automatic overage, so two independent things can grow your bill
- The function and edge layers are competent but not where you would build a substantial backend
- Costs scale with seats as well as usage, which is awkward for large teams with a small site
Best for: Content, documentation and marketing sites with real routing requirements, where declarative redirects and proxy rules are doing actual work.
Pricing: Per-seat tiers with included bandwidth, build minutes and function invocations, and independent usage-based charges above each allowance.
Vercel

Vercel is a framework compiler with a static host attached rather than the reverse. For a purely static site it is excellent and somewhat beside the point: you are paying for automatic analysis of your framework into static assets, functions and middleware, and a purely static site uses only the first of the three. Where it earns its place is when the site is static today and will grow dynamic parts tomorrow.
Pros
- The best preview deployment experience in this comparison, with tight pull request integration and per-deploy URLs
- Zero-configuration builds for every common JavaScript framework, including the ones with unusual output structures
- A clean growth path from fully static to partially dynamic without changing platform
- Deploy inspection and build logs are the most usable here when something goes wrong
Cons
- Multiple meters move with traffic, so a static site that becomes partly dynamic changes cost shape quickly
- Framework coupling is the point of the product and is also the migration cost, which is the subject of Vercel alternatives
- Overkill for a site that is genuinely static and will stay that way
Best for: JavaScript framework sites that are static now and expect dynamic routes later, where preview deployment quality is worth the meter.
Pricing: Per-seat subscription over usage meters for bandwidth, function invocations and execution duration, with included allowances and automatic overage.
GitHub Pages
GitHub Pages serves a branch or a build artefact from a repository, with a CDN in front and automatic certificates for custom domains. It is the least featured option here by a wide margin and it is the right answer more often than people admit: for project documentation, a personal site, or anything that lives next to code and does not need routing rules, there is nothing to operate and nothing to pay.
Pros
- No separate account, vendor or bill; the site lives in the repository it documents
- Builds run in GitHub Actions, so the build is the same CI you already have with the same caching
- Automatic certificates for custom domains with no configuration beyond a DNS record
- Effectively zero operational surface, which for documentation is exactly correct
Cons
- No redirect or header configuration worth the name, so path changes and security headers are not expressible
- No preview deployments natively; you build that yourself in Actions if you need it
- Published limits on repository size, build frequency and bandwidth make it unsuitable for a commercial site at any scale
Best for: Project documentation, personal sites and anything that should live beside the code and never needs a redirect rule.
Pricing: No charge for public repositories; build time consumes your Actions allowance, and the service is not sold with a commercial bandwidth tier.
Render

Render’s static site hosting is a secondary product next to its application platform, and that is exactly why it belongs on this list. If your static frontend sits in front of services and a database that already run on Render, keeping the frontend in the same account with the same deploy pipeline and the same private networking removes a vendor rather than adding one.
Pros
- Static sites, application services, workers, cron jobs and managed databases under one account and one bill
- Redirect and rewrite rules including proxying to your own backend services on the same private network
- The same YAML infrastructure definition covers the frontend and everything behind it
- Pull request previews work consistently across static sites and services, so a preview covers the whole stack
Cons
- The global distribution story is weaker than the CDN-first platforms, so distant users depend entirely on edge caching being right
- Build performance is unremarkable and large dependency trees feel it on every branch
- Fewer static-specific features than the specialists, because static is not the main product
Best for: Teams whose backend already runs on Render and who want the frontend deployed by the same pipeline into the same network.
Pricing: Static sites carry no per-instance charge; bandwidth is metered above an account allowance shared with your other services.
Surge
Surge is a single command that publishes a directory to a URL. There is no dashboard to learn, no build system, no git integration and no configuration beyond a couple of files. It is a deliberately small tool and it is the fastest way in this entire article to get a directory of HTML onto the internet with TLS.
Pros
- Publishing is one command from a local directory, with no account setup ceremony or repository connection
- Trivially scriptable from any CI system, because it is a CLI rather than a git integration
- Supports clean URLs and a single-page-application fallback, which covers the common client-routing case
- Almost nothing to learn, so it is genuinely useful for throwaway previews and client demos
Cons
- No build system, so your CI must produce the directory and no preview deployments exist without you building that flow
- Redirect and header capability is minimal compared to everything else here
- Small operation with a correspondingly small support and reliability story, which rules it out for anything commercially important
Best for: Demos, client previews, prototypes and internal one-off sites where speed of publishing beats every other consideration.
Pricing: Free tier for basic publishing with a paid tier adding custom domains with certificates and a few extras; no usage meters of consequence.
AWS S3 and CloudFront
This is the assemble-it-yourself option: object storage for the files, a CDN in front for distribution and TLS, and whatever you build around them for deploys and invalidation. It is more work than everything above and it is the only option here with no ceiling, which is why it remains the answer for large sites and for anything that must live inside an existing AWS account.
Pros
- No platform limits on site size, file count, domains or bandwidth beyond what you are willing to pay for
- Full control of cache behaviour, cache keys, origin request policies and edge functions
- Lives inside your existing AWS account, so commitments, permissions boundaries and compliance perimeter apply
- Certificates for many custom domains at scale is a normal, supported operation rather than a support conversation
Cons
- Nothing is provided for you: deploys, cache invalidation, preview environments and rollback are all pipelines you write and maintain
- Egress pricing is the meter people underestimate, and it is the reason this option can be the most expensive rather than the cheapest
- The configuration surface is large enough that a misconfigured cache policy or origin access setting is a routine incident
Best for: Large sites, many customer domains, or organisations where the workload has to live in their own AWS account regardless of convenience.
Pricing: Metered on storage, requests and data transferred out, with cache invalidation requests priced separately above an included allowance. The egress question is examined across providers in cloud cost compared.
How to choose
Start with the routing requirement. Write down every redirect, header and proxy rule you need. If that list includes proxying an API under your own domain, or country-conditional routing, most of this list is already eliminated and you are choosing between Netlify, Cloudflare Pages and building it yourself.
Then project bandwidth at twelve months, including bots. If the number is large, the economics only really change on Cloudflare or a self-assembled setup. Everything else is reselling the same egress.
Then check build minute exposure. Multiply builds per week by build duration, across all branches. If that number is uncomfortable, fix caching before changing platform, because you will carry the same problem across.
Then decide whether previews are a requirement. If yes, GitHub Pages and Surge are out unless you are willing to build the flow yourself in CI.
Then handle certificates. If you serve customer domains, ask every vendor about the ceiling and the automation, and treat a vague answer as a no.
| Platform | Redirects and headers | Preview deploys | Bandwidth posture | Picks itself when |
|---|---|---|---|---|
| Cloudflare Pages | Repository files plus zone rules | Yes, per branch | Structurally cheapest at scale | Bandwidth is the dominant cost |
| Netlify | Most expressive here, including proxy rules | Yes, polished | Metered with automatic overage | Routing rules are doing real work |
| Vercel | Configuration file, framework-aware | Yes, best in class | Several meters move with traffic | Static now, dynamic soon |
| GitHub Pages | Effectively none | No, build it yourself | Not a commercial tier | Documentation next to the code |
| Render | Rules including proxy to your own services | Yes, across the whole stack | Pooled with your other services | The backend already lives there |
| Surge | Minimal | No | Not a meaningful meter | One command, one directory, right now |
| AWS S3 and CloudFront | Total control, entirely yours to build | No, build it yourself | Metered egress, no ceiling | Scale or an AWS account boundary |
| HTTP caching semantics | (standard, not a product) | Not applicable | Determines all of the above | Always; configure it first |
Needs first-hand data: Take one site and serve it from each platform with identical cache headers, then measure cache hit ratio and origin requests over a week of real traffic from several regions. Platforms differ in how faithfully they honour
stale-while-revalidateand how they build cache keys, and those differences show up as origin load rather than in any documentation.
Frequently asked questions
Do I need a separate CDN in front of a static host?
No. Every platform here except a bare object storage bucket already serves from a global network. The case for a separate CDN is control over cache keys, purge behaviour and edge logic that the bundled layer does not expose, which is covered in CDN providers.
How do I stop a scraper from consuming my bandwidth allowance?
Rate limiting and bot detection at the network layer, which means the platform in front of your files needs to offer it. This is one of the strongest practical arguments for hosting where your firewall already lives, and it is a different decision from choosing a host.
Is static hosting actually cheaper than a server?
For the same traffic, almost always, because you are paying for bytes rather than for a process waiting for requests. The comparison stops being simple when the site needs dynamic behaviour, at which point you are choosing between functions attached to a static host and a real process, which is the subject of serverless function platforms and PaaS platforms.
What should my cache headers be?
Hashed asset filenames get a very long max-age with immutable. HTML gets a short max-age
or zero with revalidation. If your build does not hash asset filenames, fix that first,
because every other caching decision is downstream of it.
Can I host customer-supplied domains on these?
Technically on most, practically on a few. The distinguishing features are automated certificate issuance on domain verification, automated renewal, apex domain handling, and no low ceiling on domain count. Verify all four before you build a feature that depends on it.
Related reading
- Best hosting platforms for developers — the abstraction map, and when static stops being the right rung.
- Best CDN providers — cache keys, purge behaviour and edge logic beyond what a bundled network exposes.
- Best DNS providers — the control plane for every domain migration you will do.
- Vercel alternatives — for sites that grew dynamic parts and grew a bill with them.
- Best S3 alternatives — object storage options with very different egress economics if you assemble it yourself.