Automation & Agents

Launch a Website in One Evening Without Knowing DevOps: $0 Hosting on Astro + Cloudflare Pages, and the DNS Traps to Avoid

How much does a brand website actually cost? About $11 a year for the domain, everything else is $0. The build itself is fast — the time sink is the invisible debt a DNS migration leaves behind. This note walks through the full setup plus the three traps that catch almost everyone.

09/28/2026 | 4 min read

One Core Idea

A content website doesn’t need a rented server. If your site is just pages for people to read — an intro, articles, links — it’s a pile of static files that belongs on a free CDN. Paying for hosting only makes sense once you need accounts and a database, and that’s a future problem, not a today problem.

Step by Step (about 2–4 hours)

Step 1 | Buy the domain (the only step that costs money)

Search your name on Porkbun or Cloudflare Registrar; a .com runs about $11/year. After buying, turn on all four: Auto-Renew, Domain Lock, WHOIS Privacy, and DNSSEC.

Step 2 | Have an AI generate an Astro site

Tell Claude or ChatGPT: “I’m a complete beginner. Help me build a one-page brand website with Astro: a one-line brand statement, three content pillars, social links, and an email signup box. Walk me through running it on my computer one step at a time, and wait for me to report back before moving on.”

Step 3 | Push it to GitHub

Create a GitHub account and a private repo, then push the site’s code. If you’ve never used git, ask the AI: “I’ve never used git. Teach me how to push this folder to a private GitHub repo, one command at a time, explaining what each command does.”

Step 4 | Connect Cloudflare Pages (free hosting)

Sign up for Cloudflare (turn on TOTP two-factor auth), then go to Workers & Pages in the dashboard. Trap: in the new UI, clicking Create routes you into Workers with no visible Pages option. Scroll to the bottom of the page — there’s a small line reading “Looking to deploy Pages? Get started.” That’s the way in. From there: Connect to Git → authorize GitHub → pick your repo → set framework preset to Astro, build command npm run build, output dist → Deploy. You’ll get a preview URL like xxx.pages.dev.

Step 5 | Move the domain’s DNS into Cloudflare

Cloudflare → Add a domain → enter your domain → it auto-imports your existing DNS records → gives you two nameserver (NS) hostnames → go back to where you bought the domain (e.g. Porkbun) and switch the NS to those two.

Step 6 | ⚠️ The step that matters most — clean up leftover DNS records

Once the NS switch takes effect, go to Cloudflare → your domain → DNS → Records and check every single record: delete anything still pointing at your old registrar’s domain (e.g. xxx.porkbun.com). Pay special attention to any wildcard CNAME with Name * — that “parking” record hijacks every subdomain to an ad page. Delete old MX (mail) records too; you’ll add fresh ones next.

Step 7 | Attach the real domain and set up email forwarding

Pages project → Custom domains → add your domain (and www) — Cloudflare handles DNS and HTTPS automatically. Domain → Email → Email Routing → add a destination inbox (check Gmail for the verification email) → create a rule hello@yourdomain → your Gmail → enable it (an “MX conflict” error means Step 6 wasn’t finished — go back and clean up). Finally, add a TXT record so no one can spoof mail from your domain: Name _dmarc, value v=DMARC1; p=quarantine; rua=mailto:your-gmail.

Step 8 | Verify (all four, no skipping)

① Open your domain on your phone — you see your own site, not an ad page. ② Send an email from another address to hello@ — it actually arrives in Gmail. ③ Submit a test email in the signup box — it shows up in the backend.

Pitfalls You Will Hit

  1. Site still shows an ad page after the DNS move: your old registrar’s parking A record got imported. Delete it, or just do Step 7’s Custom domain setup, which overrides it automatically.
  2. Email Routing fails to enable with “MX conflict”: an old MX record wasn’t removed. Delete every non-Cloudflare MX record, then enable.
  3. A link-checker says all your social accounts are “fine” but some were never created: platforms like Threads and Instagram return HTTP 200 even for accounts that don’t exist. Don’t trust the tool — open the link on your phone and look.
  4. Can’t “claim” a Threads handle: Threads has no independent signup. Logging into Threads with your brand’s Instagram account auto-generates a matching Threads handle — just make sure the IG handle is right first.

When You Get Stuck, Ask an AI

Paste this into Claude or ChatGPT, fill in your situation, and paste the full error message verbatim (don’t summarize it):

I'm a complete beginner following a guide to [set up a site on Astro + Cloudflare Pages].
I'm stuck at [which step], and the screen shows [paste the exact error or on-screen text].
My OS: [Windows/Mac].

Please explain what's happening first, then walk me through fixing it one step at a time,
waiting for me to report back after each step.

One-Line Summary

Ship content first, build the factory later, and only pay for what you need today — an $11 domain is already enough to start.

Support this work:Support on Ko-fi