How to Host a Project for Free in 2026: GitHub Pages, Cloudflare, Netlify & Vercel
A client once asked me to "just put the site somewhere" the night before a demo. I picked the wrong host, spent two hours fighting a build that worked fine on my laptop, and shipped at 1am. The site itself took twenty minutes to build. The hosting decision ate the rest of the evening.
Free hosting in 2026 is genuinely good, and there are more real options than the usual three everyone lists. The catch is that the free tiers shifted a lot this past year. Netlify moved to a hard credit cap in September 2025. Vercel quietly stopped counting "build minutes" at all. And Cloudflare Pages keeps handing out unlimited bandwidth like it costs them nothing. If your advice is from 2024, some of it is now wrong.
I have shipped production sites on all four of these. Below is where each one wins, where each one bit me, the current free-tier numbers (checked against the official docs in July 2026), and the exact steps to deploy on each. No "it depends" hand-waving.

The 2026 comparison table
All four services have a real free tier. Not a trial, not a 14-day tease. Free as in you can host a portfolio on it for years and never enter a card. But they are built for different jobs. Bookmark this table; it is the whole article in one screen.
| Feature | GitHub Pages | Cloudflare Pages | Netlify | Vercel |
|---|---|---|---|---|
| Best for | Static sites, docs | High-traffic static, JAMstack | Forms, functions, JAMstack | Next.js, React, SSR |
| Bandwidth | 100 GB/mo (soft) | Unlimited | ~15 GB/mo (new plans)* | 100 GB/mo (hard) |
| Builds | 10/hour | 500/month | 300 credits/mo pool | No minute cap* |
| Functions | None | 100k req/day | 10s timeout, metered | 1M/mo, 300s max |
| Custom domain + SSL | Free | Free | Free | Free |
| Commercial use on free tier | Personal/project only | Allowed | Allowed | Not allowed |
| Setup difficulty | Easy | Easy | Medium | Easy |
* Netlify accounts created before September 2025 keep the old 100 GB bandwidth + 300 build-minute limits. New accounts are on the credit model, where ~15 GB is what 300 credits buys if you spend them all on bandwidth. Vercel dropped build-minute metering entirely and now caps build hardware (2 vCPUs, one concurrent build) instead.
What changed this year (your old advice is stale)
Most "free hosting" posts you will find still quote 2023 numbers. Three things moved, and they matter enough to change which host you pick.
Netlify went credit-based (Sept 2025)
New free accounts get 300 credits a month and a hard stop. No overage, no surprise bill: when credits run out, your sites pause until the next cycle. Bandwidth costs roughly 20 credits per GB, so the free plan is closer to 15 GB/month than the old 100 GB. If you signed up years ago you are grandfathered onto the old limits, which is why half the internet still says "100 GB free."
Vercel stopped counting build minutes
The "6,000 build minutes" figure every old guide repeats is gone. Vercel Hobby now gives you fixed build hardware and one concurrent build instead of a minute budget. Functions run on Fluid compute with a 300-second max duration (up from the old 10-second limit), and Fast Data Transfer is capped at 100 GB/month with no way to buy more on the free plan. Hobby is still strictly non-commercial.
Cloudflare Pages is the value king now
Unlimited bandwidth on the free tier, commercial use allowed, no credit card, 500 builds a month, and Workers-powered functions at 100,000 requests a day. For a static site that might get traffic, nothing else on this list competes on price, which is exactly zero no matter how popular you get. It belongs in the conversation and most old posts skip it.
GitHub Pages: the zero-effort default
GitHub Pages was the first place I ever deployed a website, and it is still my reflex for anything static. Your code is already on GitHub. Flip a setting, push to a branch, and you get a live URL at username.github.io/repo. No dashboard to learn, no build config to babysit.
It shines for portfolios, project docs, landing pages, and Jekyll blogs (Jekyll is built in, so those need no config at all). It does not do server-side rendering, API routes, or any backend logic. It serves flat HTML, CSS, and JavaScript. That is the deal.
Two limits catch people. The published site is capped around 1 GB, and the build pipeline is soft-limited to about ten builds an hour. I once hit the build ceiling pushing rapid fixes to a docs site during a launch and had to just wait it out. For a normal project you will never notice either.
Pros
- •Nothing to set up if your code is already on GitHub
- •Free custom domains with automatic HTTPS
- •Jekyll built in, no config needed
- •Every deploy is a commit you can roll back
- •The de facto home for open-source docs
Cons
- •Static only: no SSR, no functions, no backend
- •Free tier is for public repos (private needs GitHub Pro)
- •No deploy previews for pull requests
- •Not meant for a commercial business or store
- •Framework builds need a GitHub Action to compile first
Reach for GitHub Pages when
- • You are shipping a portfolio, landing page, or plain HTML/CSS/JS
- • You are hosting docs for an open-source project
- • You want the simplest possible path and your repo is public
- • You are using Jekyll
Cloudflare Pages: unlimited bandwidth, no catch
This is the one most "top 3" lists forget, and it is the one I recommend most often now. Cloudflare Pages gives you unlimited bandwidth on the free tier. Not a soft limit, not a credit pool: unlimited. Your static assets ride Cloudflare's CDN, which is one of the largest on earth, and static requests do not count against anything. A side project that unexpectedly hits the front page of Hacker News will not cost you a cent or get throttled.
Commercial use is allowed too, with no card required to start. You get 500 builds a month, up to 100 projects, and Pages Functions (backed by Cloudflare Workers) at 100,000 requests a day shared across your account. For a marketing site, docs, a blog, or any framework that exports static files, it is hard to argue with free-and-unlimited.
The honest catch: the free plan caps a site at 20,000 files, and each Functions invocation gets 10 milliseconds of CPU time. The file cap bit me on an image-heavy Next.js export once, where every optimized image variant is its own file and they add up fast. The 10ms CPU budget is fine for light API glue and redirects but not for heavy server work. Know those two numbers and you will not get surprised.
Pros
- •Unlimited bandwidth, even on a viral spike
- •Commercial use allowed, no card to start
- •Huge global CDN, fast almost everywhere
- •Pages Functions for lightweight APIs (100k/day)
- •Preview deploys for every branch
Cons
- •20,000-file cap per site bites image-heavy builds
- •10ms CPU per function invocation on free
- •Full Next.js SSR needs the newer adapter and some setup
- •25 MiB max per file
- •The dashboard sprawls into the wider Cloudflare product
Reach for Cloudflare Pages when
- • Your static site might actually get traffic and you refuse to pay for bandwidth
- • You need commercial use on a free plan
- • You want global speed without configuring a CDN yourself
- • You need a bit of backend logic but not heavy compute
Netlify: forms and functions, now credit-metered
Netlify is the Swiss Army knife. The moment it won me over was form handling: I had spent an afternoon wiring a contact form through a third-party service, and Netlify did it with a single HTML attribute and zero backend. It supports basically every static site generator (Astro, Hugo, Eleventy, Gatsby, Next static export, Jekyll) and usually detects your framework on its own.
The feature set is still the widest here: deploy previews on every pull request, serverless functions, form handling, split testing, redirects and headers vianetlify.toml. If you want the most capability without paying, this is it.
The thing you need to know in 2026 is the billing change. New free accounts run on a credit model: 300 credits a month, hard cap, and sites pause when you run out rather than billing you. That is friendlier for avoiding surprise charges but tighter on bandwidth than the old plan (think ~15 GB, not 100 GB). Functions still carry a 10-second timeout on free. And the dashboard has a real learning curve; I have lost an hour to a build failing because auto-detection guessed the wrong publish directory.
Pros
- •Deploy previews on every PR, a genuine workflow upgrade
- •Built-in form handling, no backend required
- •Serverless functions and edge handlers
- •Works with almost any static site generator
- •One-click rollbacks and commercial use on free
Cons
- •New credit cap is tighter than the old free bandwidth
- •Most features here means the steepest learning curve
- •10-second function timeout on free
- •netlify.toml syntax is not always intuitive
- •Cold starts on functions can feel sluggish
Reach for Netlify when
- • You need a contact form without standing up a backend
- • Deploy previews matter for your team or clients
- • You use a less common generator like Hugo or Eleventy
- • You want split testing or complex redirect rules
Vercel: the Next.js home turf
Full disclosure: I build a lot of Next.js, and Vercel is made by the same team, so I am biased. But the developer experience earns it. The first Next.js app I pushed went from git commit to a live URL in about thirty seconds with no config file. Every push since gets its own preview URL automatically. That loop is genuinely hard to give up.
Vercel is built around the modern JavaScript ecosystem: Next.js, React, Vue, Nuxt, SvelteKit, Astro. It handles SSR, API routes, and incremental static regeneration without you thinking about servers. The Edge Network caches your site worldwide by default. For a framework app, the config-free experience is the selling point.
Two caveats worth saying out loud. First, the free Hobby tier is non-commercial only, and Vercel enforces it: if your site makes money, you are meant to be on Pro at $20 a month. That is the single biggest reason people move a client site off Vercel. Second, the numbers changed. Ignore any guide quoting "6,000 build minutes"; Vercel dropped that metric. Today you get 100 GB Fast Data Transfer (a hard cap you cannot top up on free), one million function invocations, and a 300-second function limit. For a personal portfolio you will not come close to the ceilings.
Pros
- •Zero-config deploys for Next.js and most JS frameworks
- •Fast deploys and automatic preview URLs per push
- •Global Edge Network with automatic caching
- •First-class SSR, API routes, and ISR
- •The best developer experience on this list
Cons
- •Free tier is non-commercial, and it is enforced
- •100 GB transfer is a hard cap you cannot top up on free
- •Overkill for a plain static HTML site
- •No built-in form handling like Netlify has
- •Best value is tied to the Next.js world
Reach for Vercel when
- • You are building with Next.js, React, or another modern JS framework
- • You need SSR or API routes and want them to just work
- • Deploy speed and developer experience are priorities
- • The project is personal or a portfolio (not revenue-generating)
Which one should you pick?
Start from what you are building, not from what is trendy. The most common mistake I see is someone reaching for Vercel because it is popular, then fighting it to host a Jekyll blog. Match the tool to the job. Here is the decision table I actually use.
| If your project is... | Pick | Why |
|---|---|---|
| Plain HTML/CSS/JS or Jekyll | GitHub Pages | Zero setup, lives next to your code |
| Static site that may get real traffic | Cloudflare Pages | Unlimited bandwidth, never bills you |
| A commercial/client static site | Cloudflare or Netlify | Commercial use allowed on free |
| Needs forms without a backend | Netlify | Form handling built in |
| Next.js / React with SSR | Vercel | Made for it, zero config |
| Hugo, Astro, or Eleventy | Cloudflare or Netlify | Broadest generator support |
Still on the fence?
My honest default in 2026: static site goes to Cloudflare Pages, Next.js app goes to Vercel, and if I need a form or a preview-heavy client workflow I go Netlify. All four are free and your code lives in Git, so migrating later is a fifteen-minute job, not a rewrite. I have moved projects between all of them more than once. Pick one and ship.
Step-by-step: deploying on each
Enough theory. Here are the exact steps I follow for each host, assuming you have a project in a Git repo ready to go. Before you deploy anything, do one quick thing: compress your images and add a favicon. Heavy images are the fastest way to burn through a bandwidth cap, and a missing favicon is the most common "looks unfinished" giveaway.
Deploying to GitHub Pages
1. Prepare the repo
Push your project to GitHub. Your entry file should be index.html.
2. Open Settings → Pages
On the repo, go to Settings, then Pages in the sidebar.
3. Choose the source
Pick your branch (usually main) and folder (root or /docs). Save.
4. Wait for the first build
You get a URL at username.github.io/repo in a minute or two.
5. Add a custom domain (optional)
Enter your domain in the same Pages settings and add a CNAME record at your DNS provider.
Gotcha:
Deploying a framework build and getting 404s? Add an empty .nojekyll file to the output root. GitHub runs everything through Jekyll by default, which mangles folders that start with an underscore.
Deploying to Cloudflare Pages
1. Open the dashboard
Sign in at dash.cloudflare.com, go to Workers & Pages, then Create → Pages.
2. Connect Git
Link your GitHub or GitLab account and select the repository.
3. Set the framework preset
Cloudflare offers presets (Next.js, Astro, Vue, and more). It fills in the build command and output directory for you.
4. Save and deploy
First build takes a couple of minutes. You get a pages.dev URL.
5. Add a custom domain
Under Custom domains, add yours. If the domain is already on Cloudflare, DNS is one click.
Gotcha:
If your build produces more than 20,000 files (common with image-optimized Next.js exports), the deploy fails. Trim generated variants or move heavy assets to R2 or an external CDN.
Deploying to Netlify
1. Sign up and add a site
At netlify.com, sign in (GitHub auth is easiest), then Add new site → Import an existing project.
2. Pick the repo
Authorize Netlify and select your repository (you may need to grant access to it specifically).
3. Confirm build settings
Netlify usually auto-detects. Typical: build command npm run build, publish directory dist or build.
4. Deploy
Click Deploy. You get a random .netlify.app subdomain to start.
5. Add a domain (optional)
Domain settings → Add custom domain, then follow the DNS steps. SSL is automatic.
Tip:
Add a netlify.toml for build settings, redirects, and headers. For a single-page app, add a catch-all: /* /index.html 200.
Deploying to Vercel
1. Sign up
At vercel.com, sign up with GitHub for the smoothest path.
2. Import the repo
Add New → Project, choose your Git provider, pick the repo.
3. Configure (or do not)
For Next.js, React, or Vue, the defaults are correct. Just click Deploy.
4. Wait (briefly)
First deploy is usually under a minute. You get a .vercel.app URL.
5. Add a custom domain
Project → Settings → Domains. Add your domain and follow the DNS instructions.
Tip:
Install the CLI (npm i -g vercel) and deploy from the terminal with a single vercel. It is the fastest loop for quick prototypes.
Pro tips and mistakes that bit me
Things I wish I knew earlier
- 1.Never hardcode secrets. All four hosts have environment-variable settings. Use them. A leaked key in a public repo gets scraped within minutes; I have watched it happen to a friend's test project.
- 2.Run the production build locally first. If it works in dev but fails in CI, it is almost always a Node version mismatch or a case-sensitive import that macOS forgives and Linux does not.
- 3.Compress images before you ship. On a hard bandwidth cap this is the single biggest lever. A quick pass through an image compressor and switching to WebP routinely cuts page weight by half.
- 4.Custom domains are easier than they look. It is one CNAME record. All four hosts print the exact value to paste. Setup takes five minutes; DNS propagation can take an hour.
- 5.Use preview deploys as your staging. On Cloudflare, Netlify, and Vercel, every branch or PR gets its own URL. Share that with a client instead of pushing to production.
Mistakes that will bite you
- 1.Wrong output directory. Your framework builds to
distbut you told the hostbuild. Result: a blank page or 404s. Check where your build actually writes. - 2.No SPA redirect rule. Single-page apps 404 on refresh without a catch-all rewrite to
index.html. Add it in_redirects(Netlify),vercel.json, or a Cloudflare rule. - 3.Ignoring the build log. Read the error. "Module not found" usually means an uncommitted file. "Command failed with exit code 1" means run that command locally and watch it break.
- 4.Node version drift. Local is on Node 22, the build server defaults to something older. Pin it with an
enginesfield in package.json or a.nvmrc. - 5.Running a business on the wrong free tier. Vercel Hobby and GitHub Pages are not for commercial sites. If it makes money, use Cloudflare, Netlify, or a paid plan before it becomes a problem.
Frequently asked questions
Which free host is best in 2026?▼
For a static site, Cloudflare Pages, because unlimited bandwidth and commercial use on a free plan is unmatched. For a Next.js or React app, Vercel, because it is config-free and made for the framework. GitHub Pages wins on simplicity for plain HTML and docs, and Netlify wins when you need forms or heavy preview workflows.
Can I use these for a commercial or client project?▼
Cloudflare Pages and Netlify allow commercial use on their free tiers. Vercel's Hobby plan is non-commercial only and they enforce it, so a revenue-generating site should be on Pro ($20/month). GitHub Pages is fine for a project or portfolio but is not intended as a host for an online business or store.
What happens if I hit the bandwidth limit?▼
On Cloudflare Pages, you will not hit one, bandwidth is unlimited. On Vercel, once you pass 100 GB new deploys pause but cached content keeps serving. On Netlify's credit plan, sites pause until the next cycle rather than billing you. GitHub Pages sends a warning and may throttle rather than take the site down. None of them surprise-bill you on the free tier.
To stay well under any cap, compress your images and serve WebP. Images are almost always the bulk of page weight.
Can I migrate between platforms later?▼
Yes, and it is easier than you expect. Your code is in Git, so switching hosts is mostly connecting a different service to the same repo and updating DNS. The migration itself is fifteen minutes; the slow part is DNS propagation. Deploy on the new host before pointing the domain over, and you get zero downtime.
The only rework is platform-specific features. Netlify form handling or Vercel API routes need adapting if you leave. Plain static sites move with no changes at all.
Can I host a backend or API for free?▼
For light API glue, yes. Cloudflare Pages Functions give 100,000 requests a day (with a 10ms CPU budget each), Netlify functions run with a 10-second timeout, and Vercel functions allow up to 300 seconds. GitHub Pages cannot do this at all, it is static files only.
For a real backend with a database, WebSockets, or long-running jobs, use a dedicated host like Render, Fly.io, or Railway. The functions on these static hosts are for small endpoints, form handlers, and auth callbacks, not a full server.
Do I need the command line?▼
For GitHub Pages, no, the web UI covers everything. For the others you will want basic terminal skills to run and test your build locally (npm run build), but the deploy itself happens through their dashboards. Each host also has an optional CLI once you are comfortable.
Are there other free hosts worth knowing?▼
A few. Render hosts static sites free (drawing on its included bandwidth and build minutes). GitLab Pages is the GitLab-native equivalent of GitHub Pages, built via CI. Firebase Hosting is solid but its free tier has a low daily bandwidth cap (around 10 GB a month), so it fits small projects best. For most people the four in this guide cover it.
Before you deploy, tidy up the assets
Whichever host you pick, two things make a free site look finished and keep it under any bandwidth cap: light images and a real favicon. Both take a minute in the browser, no upload, no signup.
New to picking tools? See my roundup of the free developer tools I actually reach for.