Put any website online for free
Push your code to GitHub, then host it on Cloudflare, Vercel or Render. This guide shows the steps for each and which host fits which type of site.
Put your code on GitHub
All three hosts deploy from a GitHub repository, so every push to main updates your live site.
Create a repository
- Sign in at github.com, press New and name the repo, for example my-site.
- Keep it Public or Private. All three hosts can read private repos after you allow access.
Upload your files
Easiest: on the empty repo page press uploading an existing file, drag your project files in and commit. With Git on your computer, run this inside the project folder:
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/USERNAME/my-site.git
git push -u origin mainOptional: GitHub Pages
For a plain static site you can stop here. In the repo open Settings, then Pages, choose Deploy from a branch, pick main and / (root), and save. Your site appears at username.github.io/my-site. It serves static files only, with no server code.
Which host for which site
Find your type of site, then follow that host's steps below.
| Type of site | Best host | Why |
|---|---|---|
| Plain HTML, CSS and JS (portfolio, tools, landing pages) | Cloudflare, or GitHub Pages | Static requests are free and unlimited on Cloudflare, with a fast global CDN. |
| React, Vite, Vue or Svelte app | Cloudflare or Vercel | Both build from GitHub and give a preview link for every change. |
| Blog or docs (Astro, Hugo, Jekyll, Docusaurus) | Cloudflare or GitHub Pages | Pure static output, so the cheapest and fastest option fits. |
| Next.js with server rendering | Vercel | Made by the Next.js team. Free plan is personal and non-commercial only. |
| Site plus small API or Telegram bot webhook | Cloudflare Workers or Vercel functions | Serverless code runs only when called, so nothing sleeps. |
| Node, Python, Flask, Django or any always-on server | Render | Runs a real server from your repo. The free one sleeps after 15 idle minutes and takes about a minute to wake. |
| Needs a database | Render Postgres, Cloudflare D1, or Supabase | Static hosts cannot store data. Free Render Postgres expires after 30 days, so check before relying on it. |
| Shop, ads or paid client work | Cloudflare, or a paid plan | Vercel's free Hobby plan does not allow commercial use. |
Host on Cloudflare
Best default for static sites and front-end apps. Free static traffic with no bandwidth cap.
Connect the repository
- Open dash.cloudflare.com and go to Workers & Pages.
- Press Create, choose to import a Git repository and connect your GitHub account.
- Select my-site and press Begin setup.
Set build settings
Use the values for your project type.
| Project | Build command | Output folder |
|---|---|---|
| Plain HTML | leave empty | / (or the folder with index.html) |
| Vite / React / Vue | npm run build | dist |
| Astro | npm run build | dist |
| Hugo | hugo | public |
| Docusaurus | npm run build | build |
Deploy and open your site
Press Save and Deploy. After the build finishes you get a link like my-site.pages.dev or a workers.dev address. Every push to main redeploys automatically. Files must be 25 MiB or smaller each.
Host on Vercel
Best for Next.js and front-end apps with serverless functions. Free Hobby plan is for personal, non-commercial use.
Import the project
- Sign up at vercel.com with GitHub.
- Press Add New, then Project, and import my-site.
Check the settings and deploy
Vercel detects most frameworks and fills the Framework Preset, build command and output folder for you. For plain HTML choose Other and leave the commands empty. Add secrets under Environment Variables, then press Deploy.
You get a my-site.vercel.app link. Each pull request gets its own preview link.
Host on Render
Best when you need a real server such as Node, Python or Docker. Static sites are free and always on.
Create a service
- Sign up at render.com with GitHub and press New.
- Choose Static Site for HTML or front-end builds, or Web Service for a backend.
- Select your repo and branch main.
Fill in the commands
| Type | Build command | Start command / publish folder |
|---|---|---|
| Static Site | npm run build or empty | publish folder dist or . |
| Node web service | npm install | node server.js |
| Python web service | pip install -r requirements.txt | gunicorn app:app |
Choose the Free instance type, add environment variables, and press Create.
Connect your own domain
The steps are the same idea on every host: add the domain, then create the DNS record it shows.
Add the domain in the host
- Cloudflare: open your project, then Custom domains, then Set up a domain. If the domain is on Cloudflare the record is added for you.
- Vercel: Settings, then Domains, then add the domain.
- Render: Settings, then Custom Domains, then add the domain.
Create the DNS record
In your DNS provider add exactly the record type, name and value the host shows. It is usually a CNAME for a subdomain such as www, and an A record or CNAME for the root domain. If the domain is on Cloudflare, set the record to DNS only (grey cloud) for Vercel and Render until the host reports it as verified.
HTTPS is issued automatically within a few minutes on all three hosts.
Common questions
Which free host is best for a beginner?
Cloudflare for static sites and front-end apps. Use Render only when you need a backend server, and Vercel for Next.js on personal projects.
Can I host a Telegram bot for free?
Yes. A webhook bot fits Cloudflare Workers or Vercel functions well because it runs only when Telegram calls it. A polling bot needs an always-on server, which means a paid Render instance.
My site shows a blank page after deploy. What now?
The output folder is usually wrong. Check that it matches where your build writes index.html, such as dist or build, and read the build log in the dashboard for errors.
Do I need to pay for the domain?
Hosting can be free, but a custom domain such as yourname.com is bought from a registrar each year. Free addresses like pages.dev and vercel.app work without one.