01 — Ranking
The 6 best options, ranked
Cloudflare Pages
pages.cloudflare.com
4.9Static hosting on Cloudflare's network with no bandwidth cap.
- Best for
- Any static site that could get traffic spikes: landing pages, docs, blogs and pSEO sites.
- Free plan & limits
- Unlimited sites, requests and bandwidth. Includes 500 builds per month (one at a time), 20,000 files per site at up to 25 MiB each, and 100 custom domains per project. You can upload files directly or deploy from Git, and every branch gets a preview URL.
GitHub Pages
pages.github.com
4.6Free hosting for any public GitHub repository.
- Best for
- Project docs, portfolios and Jekyll or Actions-built sites that already live on GitHub.
- Free plan & limits
- Public repositories only on the free plan. Sites are limited to 1 GB, with a soft limit of 100 GB of bandwidth per month and 10 builds per hour. There are no server-side features or deploy previews, and GitHub's terms bar running mainly commercial sites (e-commerce, SaaS).
Netlify
netlify.com
4.4A pioneer of the JAMstack, with built-in forms, redirects and deploy previews.
- Best for
- Teams that want built-in forms, split testing and a preview URL for every pull request.
- Free plan & limits
- Credit-based free plan: 300 credits per month shared across bandwidth, builds, functions and form submissions. Sites are paused when the credits run out. Custom domains and SSL are included.
Vercel (Hobby)
vercel.com
4.4Zero-config deploys for Next.js, Astro, SvelteKit and more.
- Best for
- Personal projects that may need SSR or edge functions later on.
- Free plan & limits
- Non-commercial use only. Includes 100 GB of data transfer per month, deploy previews, custom domains and SSL. Commercial use requires Pro at 20 USD per member per month.
Firebase Hosting (Spark)
firebase.google.com
4.1Google's CDN hosting with one-command deploys from the Firebase CLI.
- Best for
- Apps that already use Firebase Auth, Firestore or Cloud Functions.
- Free plan & limits
- 10 GB of storage and about 10 GB of transfer per month (360 MB per day), with custom domains and SSL. Preview channels expire after 7 days by default. Hitting the transfer quota on the Spark plan stops serving until the quota resets.
Render Static Sites
render.com
4.2Free static sites with a global CDN, alongside Render's backend services.
- Best for
- Projects whose API already runs on Render and that want the front end on the same dashboard.
- Free plan & limits
- Static sites are free. They include a monthly outbound bandwidth allowance, custom domains, SSL and pull request previews. Unlike Render's free web services, static sites never sleep.
02 — Comparison
Side by side
Scroll sideways to see every tool. The first column stays pinned.
| Feature / Criterion | Cloudflare Pages | GitHub Pages | Netlify | Vercel Hobby | Firebase Hosting | Render Static |
|---|---|---|---|---|---|---|
| Bandwidth | Unlimited | ~100 GB/month (soft limit) | Credit-based | 100 GB/month | ~10 GB/month (360 MB/day) | Monthly allowance |
| Builds | 500/month | 10/hour (soft limit) | Credit-based | Included with caps | Built locally / in CI | Included |
| Deploy previews | Yes, per branch | No | Yes | Yes | Yes (7-day channels) | Yes |
| Custom domain + SSL | Yes | Yes | Yes | Yes | Yes | Yes |
| Serverless functions | Yes (Workers quota) | No | Yes | Yes | Via Cloud Functions (Blaze plan) | Separate service |
| Commercial use | Yes | No | Yes | No | Yes | Yes |
| Card required | No | No | No | No | No | No |
03 — Guide
How to get free static site hosting step by step
Build the site to a folder of static files
Run your generator's build command (npm run build for Astro or Vite, hugo for Hugo). It produces a folder such as dist/, public/ or build/. Open dist/index.html locally to confirm the build works before deploying.
Push the source to GitHub or GitLab
Commit the source code, not the build output, and add dist/ and node_modules/ to .gitignore. If your host's default Node version differs, pin yours with a .nvmrc file or the NODE_VERSION environment variable.
Connect the repository to the host
In Cloudflare, open Workers & Pages → Create → Pages → Connect to Git. Set the build command (npm run build) and the output directory (dist). The first deploy takes 1–3 minutes and gives you a URL like project.pages.dev.
Add a custom domain
Open Custom domains → Set up a domain. If the domain's DNS is on Cloudflare, the record is created for you. Otherwise, add a CNAME from www to project.pages.dev, and use ALIAS or CNAME flattening for the root domain. The SSL certificate is issued automatically.
Configure headers, redirects and the 404 page
Add a _headers file for cache rules (long caching for hashed assets) and security headers, a _redirects file for 301 redirects, and a 404.html page. Cloudflare Pages and Netlify both support this format, so you can switch between them without changes.
04 — FAQ
Common questions
Is free static site hosting really free, with no hidden costs?
Yes, on Cloudflare Pages and GitHub Pages: no card is needed and there are no overage charges. Netlify pauses your site when its credits run out instead of billing you. Vercel Hobby is free but limited to non-commercial use. The only real cost is your domain, about 10–15 USD per year for a .com.
What is the difference between static hosting and web hosting?
Static hosting serves files that were built ahead of time from a CDN, with no PHP or database running on the server. That makes it faster, more secure and usually free. Traditional web hosting runs server-side code (PHP, WordPress) on every request. Use static hosting for blogs, docs and marketing sites, and add serverless functions for forms or APIs.
Can a static site rank well on Google?
Yes. Static pages served from a CDN typically load in well under one second (time to first byte), which helps Core Web Vitals. Google indexes the HTML directly, with no rendering delay. Many top-ranking docs sites and blogs are static: React's docs, Astro's docs and most developer blogs.
How much traffic can free static hosting handle?
Cloudflare Pages has no bandwidth limit, so viral spikes don't cost you anything. At an average page weight of about 1 MB, GitHub Pages' 100 GB soft limit covers roughly 100,000 page views per month, and Firebase Spark's 360 MB per day covers about 360 page views per day.
What are the best alternatives if I need advanced features?
For dynamic routes and APIs, use Cloudflare Workers (100,000 free requests per day, or 5 USD per month for 10 million). For commercial Next.js sites, use Vercel Pro (20 USD per member per month). For full control, use AWS S3 with CloudFront (about 1–5 USD per month for small sites) or a VPS with Caddy.
Scores reflect our own assessment of free-tier value. Prices and limits change, so check them on each provider's site before you buy.