Your website can cost nothing.
Not a free trial. Not cheap for the first year. A real website, on your own domain, with the padlock in the address bar, for zero — and it stays zero when a thousand people arrive at once.
Ten years ago this needed a server, a monthly invoice, a certificate you renewed by hand, and one bad night when your site got popular. Today it needs a folder of files and about five minutes.
This guide is for anyone with a website to put online — a portfolio, a small business page, a landing page, a blog, a college project. No jargon that is not explained, and a picture wherever a picture helps.
What is Cloudflare Pages?
Cloudflare Pages is a free home for the files that make up your website.
You hand it a folder. It copies that folder onto computers in hundreds of cities around the world. When somebody opens your site, the copy nearest to them answers. That is the whole idea, and everything else in this article is a detail of it.
There is no server that belongs to you. Nothing to log into, nothing to keep patched.
First, one word: “static”
Nearly every free-hosting article assumes you know this word. It is simpler than it sounds.
A site is not “simple” because it is static. This blog is static. Documentation for huge products is static. What matters is only this: were the pages made in advance, or does a program have to make each one on demand?
If they were made in advance, you do not need a server, and you should not pay for one.
And who is Cloudflare?
Cloudflare runs one of the largest networks on the internet. Their main business is sitting in front of other people’s websites to make them faster and to block attacks. They already have machines in hundreds of cities because that business needs them.
Pages lets you park your site directly inside that network. Serving static files is cheap for a network that size, so they do not charge you for it. That is why the free plan is believable rather than suspicious.
Why use it
Free means free
Unlimited bandwidth and unlimited visits to your files. No card needed to start, and no bill arrives on your busiest day.
No server to look after
Nothing to update, nothing to restart, nothing to be hacked at 2am. You cannot break a machine you were never given.
HTTPS, done for you
The padlock appears by itself and renews itself forever. No certificate to buy, no expiry date to write in a calendar.
Fast for everyone
Not just fast where you live. Your site sits near your visitors, wherever they are.
It survives attention
A flood of traffic and an actual attack look the same to Cloudflare, and it absorbs both. Blocking those is their day job.
Mistakes are cheap
Every version you ever published is kept. Broke the live site? Click the last good one and roll back.
Here is the honest version of the pitch. Hosting a static site is a solved problem, and the value is not what you get — it is the long list of things you never have to do again.
- Write your site.
- Push it, or drag the folder in.
- Type your domain name once.
- Rent, choose or size a server.
- Install and configure a web server.
- Buy or renew an SSL certificate.
- Apply security patches.
- Pay a monthly invoice.
- Panic when the site gets busy.
What you actually get for free
Numbers, not adjectives. These are the free-plan limits as of September 2026.
Also included and not usually free elsewhere: unmetered DDoS protection, automatic compression, HTTP/3, and a preview URL for every branch you push.
All of the above is for files. If you add server-side code — a contact form handler, a small API — that is a Pages Function, and functions draw on Cloudflare's Workers free allowance of 100,000 requests a day. Still generous, still free, but it is a counter, and files are not.
Deploy a site, start to finish
There are two ways in. Pick by whether your site is on GitHub.
Connect your Git repository
Set it up once. After that, publishing your site is git push and nothing else. Cloudflare builds the site itself.
Best for: anything you will edit more than twice.
Drag and drop a folder
No Git, no build step, no command line. You drag your finished folder onto the page and it is live.
Best for: a plain HTML site, or a one-off you want online in two minutes.
Way A — connect GitHub
Make a free Cloudflare account
Go to dash.cloudflare.com and sign up. No card, no trial clock.
Open Workers & Pages
In the left sidebar, under Compute. This one screen is where everything lives.
Create application → connect to Git
Press the blue Create application button, choose to import a repository, and authorise GitHub. Cloudflare asks which repositories it may see — you can give it one, not all of them.
Fill in three boxes
This is the only screen that ever confuses anybody, and it is three fields: what the project is called, the command that builds your site, and the folder that command produces.
Leave the build command empty if your site is plain HTML with no build step — then the output directory is just the folder holding index.html.
Watch it build, then open the link
A log scrolls past for roughly a minute. At the end you get a live address like my-portfolio.pages.dev, already on HTTPS. Your site is on the internet.
Add your own domain
Open the project → Custom domains → Set up a domain → type yoursite.com. If the domain's DNS is already with Cloudflare, the record is added for you. If not, you add one CNAME at your registrar. The certificate is issued on its own, usually within minutes.
What do I put in those two build fields? Find your tool in this table and copy the row.
| Your site is built with | Build command | Output directory |
|---|---|---|
| Plain HTML / CSS / JS | leave empty | / |
| Vite, React, Vue, Svelte | npm run build | dist |
| Create React App | npm run build | build |
| Astro | npm run build | dist |
| Next.js (static export) | npx next build | out |
| Hugo | hugo | public |
| Jekyll | jekyll build | _site |
| Docusaurus | npm run build | build |
If the build fails complaining about your Node version, add an environment variable named NODE_VERSION with the value 22 and deploy again. That single setting is the most common first-build failure.
Way B — drag and drop
No repository, no build, no terminal. In the same Create application screen, choose
the upload option and drag in either your folder or a .zip of it.
Way C — one command, no Git connection
If you prefer the terminal, or you do not want Cloudflare reading your repository at all:
npx wrangler login # authorise this computer, once
npx wrangler pages deploy dist # upload the built folder
That is the whole deployment. This very site is published that way, on purpose: the repository it lives in also holds private things, so Cloudflare is never given access to it. The build happens on my laptop and only the finished folder is uploaded. Cloudflare cannot leak what it was never handed.
Cloudflare has been merging Pages into Workers, so the newer wizard may say Create an app, and show a Deploy command like npx wrangler deploy where the older one showed a build output directory. It is the same platform and the same free static hosting underneath. Existing Pages projects keep working, and for a plain static site either route lands you in the same place.
How to update your site
This is where the Git route earns its keep. You do not “upload changes”. You do not open an FTP client. You change a file and push it.
Three things come free with that loop, and they are the reason people stay.
Every branch gets its own URL
Push a branch called new-design and you get a private-looking link showing exactly that version, live, with the real site untouched. Send it to a friend or a client before you commit to it.
Rollback is one click
Open Deployments, find the version from before you broke it, press Rollback. It is live again in seconds — no rebuild, no re-upload.
Re-drop the folder
Drag-and-drop projects update the same way they started: Create a new deployment, drop the folder again. Or re-run the one-line wrangler pages deploy.
What the CDN actually does
CDN stands for Content Delivery Network. Strip the phrase away and it means: your site is kept in many cities at once, so nobody has to fetch it from far away.
Distance is real time. Data does not travel instantly, and a request crossing an ocean and back can take a few hundred milliseconds — before the server has done anything. A normal page needs dozens of those trips. That is why a site hosted in one country feels slow in another, even when the server itself is fast.
Two details that make Pages nicer than a CDN bolted onto normal hosting:
- A normal CDN keeps a temporary copy and goes back to your server when it expires. Your server still has to exist, and still has to be up.
- With Pages, the files live on the network itself. There is nothing behind it to be slow, to be down, or to be attacked.
- Files are compressed before sending, so less travels down the wire.
- Modern connections (HTTP/3) are used where the browser supports them.
- A deploy replaces the copies everywhere — no cache to clear by hand.
- Attack traffic is filtered before it reaches your site at all.
You are not buying hosting. You are borrowing a network that was already there.
Cloudflare Pages versus the others
All of these will host a static site for free. They differ in what happens on the day your site does well.
| Cloudflare Pages | Netlify | Vercel | GitHub Pages | A $5 server | |
|---|---|---|---|---|---|
| Price | $0 | $0 | $0 (Hobby) | $0 | ~$5 / month |
| Bandwidth | Unlimited | 100 GB / month | 100 GB / month | 100 GB / month, soft | Whatever you pay for |
| Build allowance | 500 builds / month | 300 build minutes | 6,000 build minutes | 10 builds / hour, soft | You run it yourself |
| Site size | 20,000 files | Generous | Generous | 1 GB total | Your disk |
| Free custom domain + SSL | Yes | Yes | Yes | Yes | You set it up |
| Commercial use on free tier | Allowed | Allowed | Not allowed | Allowed | Allowed |
| Private repository | Yes | Yes | Yes | Needs a paid plan | n/a |
| Server-side code | Functions, 100k req/day | Functions, 125k / month | Functions, generous | None at all | Anything you want |
| DDoS protection | Included, unmetered | Basic | Basic | Basic | Yours to solve |
| Maintenance | None | None | None | None | Forever |
Free-plan terms as published in September 2026, and they do move — check the current page before betting a business on a row. Netlify moved to a credit-based free plan in late 2025; older accounts kept the bandwidth-and-minutes shape shown here.
So which one?
Cloudflare Pages
A static site you do not want to think about again. The unlimited bandwidth is the real difference: a post that goes viral costs you nothing, on any other free tier it starts a countdown.
Vercel
A serious Next.js application using server rendering. It is smoother there, and it is their own framework. Remember Hobby is personal use only — a client site belongs on a paid plan.
GitHub Pages
A small public project already on GitHub. It is a checkbox in settings. But: public repositories only on the free plan, 1 GB, and no server-side code, ever.
And if you genuinely need a database, background jobs and long-running processes, a small server is honest work. Just do not rent one to serve a folder of HTML.
The small print nobody mentions
500 a month is plenty, until a bad afternoon
Every push to your production branch spends one build, and so does every push to every preview branch. A day of chasing one CSS bug can quietly spend twenty.
Test locally, push when you mean it. Or upload the built folder directly, which uses no build allowance at all.
25 MiB per file is a hard wall
Photographs and PDFs fit easily. A video does not. Uploading one is the most common way a first deploy fails.
Put video on YouTube, Vimeo or Cloudflare Stream and embed it. Your visitors will thank you as well — nobody wants a 300 MB page.
Drag-and-drop cannot become Git-connected
If you start a project by uploading a folder and later want automatic deploys from GitHub, you have to create a new project and move the custom domain across.
If you already use Git, connect it on day one. It costs nothing extra and saves the migration.
Static means static
No PHP, no WordPress admin, no database on the box. Comments, forms and logins have to come from somewhere else — a Pages Function, or a third-party service.
This is a fair trade, not a limitation: it is exactly why there is no server to hack and no bill to pay.
Where to read more
wrangler pages deploy route in full, including the file and size limits it enforces.
One last thing
The site you are reading runs on exactly this. Pages for the files, one small function for the contact form, a tiny database behind it. It serves a full portfolio, this blog and every image on it.
It costs nothing per month, and there is no server anywhere with my name on it.
