Blog
3 min read

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 vs dynamic websites)

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)

  1. Put your site in a GitHub repository. (Git for beginners)
  2. Sign up to the host with GitHub and import the repository.
  3. Set the build command (e.g. npm run build) and output folder (e.g. dist).
  4. Deploy. You get a free subdomain like yoursite.pages.dev.
  5. 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