Deployment

How to deploy a static template to Cloudflare Pages

6 min read · step by step · updated September 2026

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.

Total time: about 10 minutes. You need a Cloudflare account (free) and, if you want a custom domain, the domain's DNS to point at Cloudflare.

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:

  1. Log in to dash.cloudflare.comWorkers & PagesCreatePages.
  2. Choose Upload assets (Direct Upload).
  3. 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.
  4. Click Save and Deploy. In a minute you get a URL like my-new-site.pages.dev.
⚠️ The classic gotcha: if you zip a folder that contains another folder, the site deploys to 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:

  1. Open your Pages project → Custom domainsSet up a custom domain.
  2. 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).
  3. 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 typeNameKeep? Why
MX@Almost always keep — email routing
TXT (SPF)@Keep and merge — email auth, never delete blindly
TXT (DKIM, DMARC)variousKeep — email signing
A / CNAME@, wwwReplace 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

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.

← Back to all guides