How do I deploy a website for free and make it live on the internet?
I've built a site locally and I have no idea how to get it onto a real URL. What's the simplest free path from localhost to something I can send people?
For a static site or a modern JavaScript app, the fastest free path is: push your code to GitHub, connect the repo to Vercel, Netlify or Cloudflare Pages, and click deploy. That's genuinely it — you'll have a live HTTPS URL in a few minutes, and every future push redeploys automatically.
Pick your host by what you're deploying:
- Plain HTML/CSS/JS, or a React/Vue/Svelte app with no backend: Vercel, Netlify, Cloudflare Pages, or GitHub Pages. All free for personal projects, all give you HTTPS and a subdomain.
- A full-stack app with server code (Next.js, an Express API, Django/Flask/Rails): Vercel handles Next.js best; otherwise Render, Railway or Fly.io have workable free or cheap tiers. Note that free tiers often sleep after inactivity, so the first visit after a quiet period is slow — fine for a portfolio, not for a real product.
- Needs a database: Supabase, Neon and PlanetScale-style hosted Postgres/MySQL all have free tiers that are plenty for a portfolio project.
The steps, concretely:
1. Put the project on GitHub (`git init`, commit, push).
2. Sign up to the host with your GitHub account and pick the repo.
3. Confirm the build settings — usually auto-detected. For a React app it's typically a build command like `npm run build` and an output folder like `dist` or `build`.
4. Add environment variables in the host's dashboard, not in your repo. Anything secret (API keys, database URLs) must never be committed.
5. Deploy. You get a URL like `your-project.vercel.app`.
The two things that break first deploys, so check them first:
- It works locally but the build fails on the host. Usually a dependency you installed globally, a case-sensitivity problem (`Header.js` vs `header.js` — fine on Windows/Mac, fatal on the Linux build server), or a missing environment variable.
- Blank page after deploy. Usually an incorrect base path setting, or API calls to `localhost` that obviously don't exist in production.
A custom domain is the one part that costs money — roughly the price of a couple of coffees a year — and it's worth it for a portfolio. Buy it anywhere, then point it at your host by following their DNS instructions; every host has a one-page guide, and the free HTTPS certificate is handled for you.