How to deploy a static template to Cloudflare Pages
One of the best things about a static site is that you can put it on the internet for zero dollars. Cloudflare Pages gives you free hosting, free CDN, free SSL and 500 builds a month. This guide takes any of our templates from a zip file to a live site.
Step 1 — Unzip the template
Download a template from the Templates page and unzip it. Inside you'll find index.html, a README.md and a LICENSE. Open index.html in your editor and make it yours — see Making a template yours.
Step 2 — Upload to Pages (direct upload)
For a one-off site this is the fastest path:
- Log in to dash.cloudflare.com → Workers & Pages → Create → Pages.
- Choose Upload assets (Direct Upload).
- Name the project (e.g.
my-new-site) and upload the folder — or zip the files at the root of the zip (no wrapping folder!) and upload that. - Click Save and Deploy. In a minute you get a URL like
my-new-site.pages.dev.
designtemplateai.pages.dev/foldername/ and the homepage 404s. Select the files (index.html, README…) and zip those, not the enclosing folder.Step 3 — Attach your domain
If your domain's nameservers are already on Cloudflare (you'll see the zone in the dashboard), this part is easy:
- Open your Pages project → Custom domains → Set up a custom domain.
- Enter your domain (e.g.
example.com) and add it. Cloudflare asks to verify a DNS record — add the CNAME it shows (or let it create one for you). - Wait 2–3 minutes for SSL issuance. Done — your site is live at your own domain with automatic HTTPS.
Step 4 — Update DNS records (if you're replacing an old site)
If the domain already points elsewhere (a server, a shared host), you need to change the DNS A / CNAME records to point at <project>.pages.dev, proxied (orange cloud). Before you flip, write down any records you must keep:
| Record type | Name | Keep? Why |
|---|---|---|
| MX | @ | Almost always keep — email routing |
| TXT (SPF) | @ | Keep and merge — email auth, never delete blindly |
| TXT (DKIM, DMARC) | various | Keep — email signing |
| A / CNAME | @, www | Replace with the Pages target |
If you delete an MX or SPF record, mail silently breaks for everyone who writes to you — the most common "site flip disaster".
Step 5 — Verify and go beyond
- Check the site from https, not http (Pages forces HTTPS anyway).
- Test one or two inner links — don't trust the homepage alone.
- Want a contact form? See Web3Forms on the Resources page — no backend code needed.
- Connect a GitHub repo for automatic deploys on every push (Pages → project → Settings → Builds & deployments → Connect to Git).
When to use Wrangler instead
If your site has more than ~1,000 files or exceeds 25 MB, the dashboard upload hits limits. The free CLI route:
npm i -g wrangler
wrangler login
wrangler pages project create my-site --production-branch=main
wrangler pages deploy /path/to/site --project-name=my-site
That's it — same result, no upload cap.