How to Deploy a Website for Free on Cloudflare Pages
Connect your GitHub repo to Cloudflare Pages and deploy a static site to a global CDN for free — with free HTTPS, an optional custom domain, and automatic redeploys on every git push. Here are the full steps.
Push your site files to a GitHub repo. Sign in to a free Cloudflare account, go to Workers & Pages → Create application → Pages → Connect to Git, and select your repo. For a plain static site, leave the build command empty and set the output directory to the folder containing index.html, then click Save and Deploy. In a minute or two the site is live at a free your-project.pages.dev address with automatic HTTPS. Every git push redeploys automatically. To use your own domain, add it under Custom domains — Cloudflare charges nothing to connect it; only the domain registration itself costs about $10/year.
Seven steps
- 1. Put your site in a GitHub repoMake sure your website files (at least an index.html) are pushed to a GitHub repository. A public repo is fine and free.
- 2. Open Cloudflare PagesSign in to a free Cloudflare account, go to Workers & Pages, choose Create application, switch to the Pages tab, and click Connect to Git.
- 3. Connect your repositoryAuthorize Cloudflare to access GitHub and select the repo that holds your site.
- 4. Configure the buildFor a plain static HTML site: leave the build command empty and set the output directory to the folder containing index.html (the repo root for most simple sites). Click Save and Deploy.
- 5. Get your live URLCloudflare builds in a minute or two and serves the site at a free your-project.pages.dev address over a global CDN with automatic HTTPS.
- 6. Add a custom domain (optional)Under the project's Custom domains tab, add your own domain. Cloudflare provisions a free SSL certificate. Domain registration costs about $10/year; Cloudflare charges nothing to connect it.
- 7. Auto-deploy on every pushFrom now on, every git push to the connected branch triggers a new build and deploy automatically — no manual upload.
Why is it "really free"?
Cloudflare Pages' free tier includes unlimited requests and bandwidth, 500 builds per month, free automatic HTTPS, and a global CDN. For a personal or small-business static site you typically pay nothing. The only possible cost is registering a custom domain — and that goes to a domain registrar, not to Cloudflare.
Frequently asked questions
Is Cloudflare Pages really free?
Do I need a build step or framework?
Is HTTPS / SSL included?
How much does a custom domain cost?
How long does a deploy take?
Can I deploy without GitHub?
Want the full hands-on version?
Drop your email and instantly download Chapter 1 of the Morgan Vault e-book (PDF) — the starting point of the full build-to-deploy workflow.
Want the whole path to building a site?
The full 200-page hands-on e-book: from your first line of HTML to deployment, SEO/AEO, 16+ languages, subscriber collection, and traffic strategy. Includes copy-pasteable scripts and AI prompt templates. 23 languages.
See the e-book bundle — $39.90 →