How to Host a Website for Free (and What 'Free' Really Means)
Static sites can be hosted free, properly, on GitHub Pages, Cloudflare, Netlify or Vercel. Apps with a backend and database are harder: free tiers sleep, expire or forbid commercial use. Which free options fit which kind of site, step by step, and the catches to know.
Yes, you can host a website for free — and for many sites, the free option is genuinely good. Whether it works for yours depends on one question:
Is your site static, or does it need a server and database?
Static sites: free and excellent
A static site is just files — HTML, CSS, JavaScript, images. Portfolios, landing pages, documentation, blogs built with Astro or similar, and many React/Vite front-ends.
These free hosts serve them fast, with HTTPS, on a global CDN:
| Host | Notes |
|---|---|
| Cloudflare (Workers static assets / Pages) | Very generous free tier, unlimited bandwidth on static assets, fast global network |
| GitHub Pages | Free for public repos, simple; not for commercial sites per GitHub's terms (GitHub Pages guide) |
| Netlify | Easy deploys, forms; free plan uses monthly credits |
| Vercel (Hobby) | Excellent for Next.js; Hobby is non-commercial use only (What is Vercel?) |
(Vercel vs Netlify vs Cloudflare Pages)
Step by step (Cloudflare, Netlify or Vercel)
- Put your site in a GitHub repository. (Git for beginners)
- Sign up to the host with GitHub and import the repository.
- Set the build command (e.g.
npm run build) and output folder (e.g.dist). - Deploy. You get a free subdomain like
yoursite.pages.dev. - Optionally add your own domain (domains themselves cost money, roughly $10–20 a year for a
.com). (Connect a custom domain)
Every push to GitHub redeploys automatically.
Forms and small features on static sites
A contact form doesn't need your own server — use a form service or your host's built-in forms. (Contact form without a backend)
Dynamic apps: free is harder
If your app has user accounts, a database, background jobs or server-side code, you need something running all the time. Free options exist, with catches:
- Free tiers that sleep — the app shuts down after inactivity, and the next visitor waits 30+ seconds while it wakes.
- Free databases that expire or pause — some free Postgres tiers are deleted after a set period; Supabase pauses free projects after a week of inactivity. (Neon vs Supabase)
- Small usage limits — monthly hours, requests or credits.
- No commercial use on some plans.
Reasonable free combinations for a hobby app:
- Static front-end on Cloudflare/Netlify + Supabase or Neon free tier for database and auth.
- Serverless functions on your static host for small API needs. (What is serverless?)
When "free" stops making sense
Free hosting is great for learning, portfolios and experiments. Consider paying when:
- Real users or customers depend on it — sleeping apps and paused databases look broken.
- You're making money — several free tiers forbid it.
- You need backups you can count on. (Backups for beginners)
- You keep hitting limits and juggling workarounds.
A small server or paid tier is often less than a few coffees a month. (How much does it cost to run an app?)
Avoid
- "Free hosting" sites that inject ads into your pages or give you no HTTPS.
- Putting secrets in a static site's code — everything shipped to the browser is public. (Hide API keys)
EasySpawn is for when free stops being enough: one server at a flat monthly price running your app, database and background jobs — always on, never sleeping — with HTTPS and daily backups. See pricing or join the waitlist.
Related: GitHub Pages · Vercel vs Netlify vs Cloudflare Pages · What Is Web Hosting? · Static vs Dynamic Websites
Keep reading
How Much Does It Cost to Run an App? A Realistic Monthly Budget
Hosting, database, domain, email, AI usage, storage, and the tools around them. What each costs for a small app, what's free, where surprise bills come from, and three example budgets — from a side project to a small business with paying customers.
What Is Vercel? What It Does, What It Costs You, and When to Use Something Else
Vercel is a hosting platform built around frontend frameworks, especially Next.js: push to GitHub and your site is live. What it actually does, what serverless functions mean for your app, where the limits are, and when a regular server is a better fit.