Skip to content

Task-7: Cloudflare Pages Deployment + DNS Migration Plan

Section titled “Task-7: Cloudflare Pages Deployment + DNS Migration Plan”

Date: 2026-05-20 Status: Ready to execute (requires Talbot’s CLOUDFLARE_API_TOKEN)


  • sites/ts/deploy.sh — identical pattern to mbr/sdc deploys; handles build + wrangler deploy
  • sites/ts/.env.exampleCLOUDFLARE_PAGES_PROJECT_NAME=ts-site
  • CF Pages project name will be ts-site → expect ts-site.pages.dev or ts-site-<suffix>.pages.dev

Terminal window
# In sites/ts/.env.local (gitignored)
CLOUDFLARE_API_TOKEN=<your-token>

Token needs Cloudflare Pages: Edit permission. Reuse the token already used for mbr/sdc.

Terminal window
cd /home/ta/projects/monorepo/sites/ts
./deploy.sh

This will:

  1. Build + Pagefind index
  2. Create the ts-site Pages project (if new)
  3. Deploy dist/ to Cloudflare

Note the pages.dev subdomain assigned — it cannot be changed after creation.

Step 3 — Add custom domain in CF dashboard

Section titled “Step 3 — Add custom domain in CF dashboard”
  1. Go to: Cloudflare dashboard → Pages → ts-site → Custom domains
  2. Add talbotstevens.com and www.talbotstevens.com
  3. CF will prompt for DNS changes

DNS Migration Plan (Canadian Web Hosting → Cloudflare)

Section titled “DNS Migration Plan (Canadian Web Hosting → Cloudflare)”
  • Registrar: unknown — check at whois talbotstevens.com
  • NS: Canadian Web Hosting nameservers
  • Hosting: Windows IIS (legacy site)
  • Hosting: Cloudflare Pages (ts-site project)
  • DNS managed by: Cloudflare (add domain to CF account, point NS)
  • Registrar: leave where it is initially; migrate later if desired

Option A — Full NS transfer to Cloudflare (recommended)

  1. Add talbotstevens.com to Cloudflare account (free plan is fine)
  2. CF scans current DNS and imports records — review before saving
  3. At registrar: change nameservers to the two CF nameservers CF assigns
  4. DNS propagates (minutes to 24h depending on registrar)
  5. In CF: add talbotstevens.com as custom domain on ts-site Pages project
  6. CF auto-provisions SSL cert

Option B — CNAME record only (if NS transfer not possible)

Some registrars block apex CNAME. CF Pages requires apex domain → use Option A.

Check existing records using:

Terminal window
dig talbotstevens.com ANY
dig www.talbotstevens.com
dig mail.talbotstevens.com # if email exists
dig _dmarc.talbotstevens.com

Common records to carry over:

  • MX records (email — critical, do not lose)
  • SPF/DKIM TXT records (email deliverability)
  • Any CNAME/A records for subdomains (e.g. webmail, ftp)
  1. Deploy to CF Pages, confirm at ts-site.pages.dev
  2. Add domain to CF, set up SSL, test at pages.dev first
  3. Lower TTL on existing DNS records to 300s (5 min) — do 24h before cutover
  4. Transfer NS to CF — old site still serves until TTL expires
  5. After propagation confirmed: set TTL back to 3600s

If talbotstevens.com has active email (e.g. MX → Canadian Web Hosting):

  • Must preserve MX records in Cloudflare DNS before flipping NS
  • Use dig MX talbotstevens.com to capture current MX targets
  • Add them verbatim in CF DNS before NS cutover

  • https://talbotstevens.com loads — HTTP → HTTPS redirect
  • https://www.talbotstevens.com loads and redirects to apex (or vice versa)
  • All 11 pages return 200
  • Pagefind search works (modal opens, results appear)
  • Gross-Up Calculator iframe loads at /gross-up
  • Dark mode toggle persists across navigation
  • Security headers present (curl -I https://talbotstevens.com)
  • Email still works (send test email to tstevens@talbotstevens.com if active)

Terminal window
cd /home/ta/projects/monorepo/sites/ts
./deploy.sh

Or add to monorepo root as a pnpm script:

"deploy:ts": "cd sites/ts && ./deploy.sh"