Per-site setup checklist derived from ActiveWizards + Arizen production deployments.
Tool Matrix
| Tool | Purpose | Priority | Setup Steps |
| CF Pages | Static hosting | Must have | 1. npx wrangler pages project create 2. Deploy with npx wrangler pages deploy dist --project-name= 3. Verify at |
| CF DNS | Domain management | Must have | 1. Add site in CF dashboard 2. Update nameservers at registrar 3. Add DNS records (A/CNAME) 4. Enable proxy (orange cloud) |
| Custom domain | Production URL | Must have | 1. CF Pages -> Custom domains -> Add 2. For subdomain: CNAME to 3. For root: CF auto-creates record |
| robots.txt | Crawl control | Must have | Create public/robots.txt: User-agent: * / Allow: / / Sitemap: https://example.com/sitemap-index.xml |
| @astrojs/sitemap | XML sitemap | Must have | 1. npm i @astrojs/sitemap 2. Add to astro.config.mjs integrations 3. Set site: in config 4. Verify at /sitemap-index.xml after build |
| GA4 | Analytics | Must have | 1. Create property at analytics.google.com 2. Get Measurement ID (G-XXXXXXXX) 3. Add gtag snippet to in BaseLayout 4. Verify real-time data |
| GSC | Search performance | Must have | 1. Add property at search.google.com 2. Verify via DNS TXT record (easiest with CF DNS) 3. Submit sitemap URL 4. Wait 2-3 days for initial data |
| OG Image | Social previews | Must have | 1. Create default 1200x630 image in public/og/ 2. Add to SEO component 3. Per-page overrides via frontmatter ogImage field 4. Test with opengraph.xyz |
| Mailgun | Transactional email | If contact form | 1. Verify sending domain at mailgun.com 2. Add DNS records (SPF, DKIM, MX) 3. Get API key 4. npx wrangler pages secret put MAILGUN_API_KEY 5. Create Pages Function handler |
| CF Web Analytics | Privacy-first analytics | Nice to have | 1. CF Dashboard -> Account -> Web Analytics 2. Add site 3. Toggle on (free, no JS needed if proxied). Alternative: add JS beacon for non-proxied sites |
| IndexNow | Instant indexing | Nice to have | 1. Generate API key 2. Create public/ with key inside 3. POST to https://api.indexnow.org/indexnow on publish: { url, key, keyLocation } |
| Lighthouse CI | Performance monitoring | Nice to have | 1. Install @lhci/cli 2. Add lighthouserc.json with assertions 3. Run lhci autorun in CI or manually 4. Target: Performance >90, Accessibility >95 |
| Sentry | Error tracking | If JS-heavy | 1. Create project at sentry.io 2. npm i @sentry/browser 3. Init in client-side script with DSN 4. Add source maps for debugging |
| astro-pagefind | Site search | Nice to have | 1. npm i astro-pagefind 2. Add to integrations 3. Add component to nav 4. Indexes all pages at build time |
| astro-compress | Asset compression | Nice to have | 1. npm i astro-compress 2. Add as LAST integration 3. Compresses HTML/CSS/JS/images on build |
| Umami | Self-hosted analytics | Future | Deploy when traffic justifies it. Docker on any VPS. Alternative to GA4 without Google dependency |
New Site Launch — Sequential Checklist
Execute in this order. Each step depends on the ones before it.
Phase 1: Foundation (Day 1)
- [ ] 1. Initialize Astro project
npm create astro@latest -- --template minimal
cd my-site && npm install
- [ ] 2. Install core dependencies
npm i @astrojs/sitemap astro-robots-txt astro-compress @tailwindcss/vite
- [ ] 3. Configure
astro.config.mjs
site: 'https://yourdomain.com'
- Add Tailwind vite plugin
- Add integrations: sitemap, robotsTxt, compress (last)
- [ ] 4. Create
public/robots.txt
User-agent: *
Allow: /
Sitemap: https://yourdomain.com/sitemap-index.xml
- [ ] 5. Create BaseLayout with SEO
- GA4 script placeholder (fill in after property creation)
- [ ] 6. Create default OG image (
public/og/default.png, 1200x630) - [ ] 7. Set up content collections in
src/content.config.ts - [ ] 8. Build and test locally:
npm run build && npm run preview
Phase 2: Hosting & Domain (Day 1-2)
- [ ] 9. Create CF Pages project
npx wrangler pages project create my-site
- [ ] 10. Deploy to staging
npx wrangler pages deploy dist --project-name=my-site --branch=staging
- [ ] 11. Verify staging URL works:
staging.my-site.pages.dev - [ ] 12. Set up CF DNS (if new domain)
- Update nameservers at registrar
- Wait for propagation (up to 24h, usually <1h)
- [ ] 13. Add custom domain in CF Pages -> Custom domains
- [ ] 14. Verify HTTPS is working on custom domain
- [ ] 15. Create
deploy.shscript for repeatable deployments
Phase 3: Analytics & Search (Day 2-3)
- [ ] 16. Create GA4 property
- Get Measurement ID
- Add gtag snippet to BaseLayout
- [ ] 17. Verify GA4: Check real-time report while browsing staging
- [ ] 18. Add site to GSC
- Verify via DNS TXT record in CF DNS
- [ ] 19. Submit sitemap in GSC:
https://yourdomain.com/sitemap-index.xml - [ ] 20. Enable CF Web Analytics (optional, free, toggle in dashboard)
Phase 4: Contact & Email (Day 3-4, if needed)
- [ ] 21. Set up Mailgun
- Add DNS records (SPF, DKIM)
- Get API key
- [ ] 22. Create Pages Function (
functions/api/contact.ts)
- Honeypot spam protection
- Dual response (JSON for fetch, redirect for form)
- [ ] 23. Set CF Pages secrets
npx wrangler pages secret put MAILGUN_API_KEY
npx wrangler pages secret put MAILGUN_DOMAIN
npx wrangler pages secret put NOTIFICATION_EMAIL
- [ ] 24. Test contact form end-to-end (staging first, then production)
Phase 5: Production Launch (Day 4-5)
- [ ] 25. Content review: All pages have meta titles, descriptions, OG images
- [ ] 26. Lighthouse audit: Target Performance >90, Accessibility >95, SEO 100
- [ ] 27. Test OG images: Use opengraph.xyz or Twitter card validator
- [ ] 28. Set up redirects if migrating from old site (
public/_redirects) - [ ] 29. Deploy to production
npx wrangler pages deploy dist --project-name=my-site --branch=main
- [ ] 30. Verify production domain resolves correctly
- [ ] 31. Submit to IndexNow (optional, for fast Bing/Yandex indexing)
- [ ] 32. Monitor GSC for crawl errors over next 7 days
Phase 6: Post-Launch (Week 1-2)
- [ ] 33. Check GSC coverage: Fix any crawl errors or excluded pages
- [ ] 34. Verify GA4 data is flowing correctly (pageviews, events)
- [ ] 35. Set up Lighthouse CI or schedule manual audits monthly
- [ ] 36. Add search (astro-pagefind) if >20 pages
- [ ] 37. Add Sentry if site has significant client-side JavaScript
Environment Variables Checklist
| Variable | Where | Required |
site | astro.config.mjs | Always |
PUBLIC_GA_ID | .env / CF env vars | If GA4 |
MAILGUN_API_KEY | CF Pages secret | If contact form |
MAILGUN_DOMAIN | CF Pages secret | If contact form |
NOTIFICATION_EMAIL | CF Pages secret | If contact form |
CLOUDFLARE_API_TOKEN | Local .env | For wrangler CLI |
NODE_VERSION | CF Pages env var | Set to 20 |
Quick Verification Commands
# Check build output
npx astro build && ls -la dist/
# Verify sitemap exists
curl -s https://yourdomain.com/sitemap-index.xml | head -20
# Test redirects
curl -I https://yourdomain.com/old-url
# Check response headers
curl -I https://yourdomain.com/
# Lighthouse (local)
npx lighthouse https://yourdomain.com --output=json --quiet | jq '.categories | to_entries[] | {(.key): .value.score}'
# Test contact function
curl -X POST https://yourdomain.com/api/contact \
-H "Accept: application/json" \
-F "name=Test" -F "email=test@company.com" \
-F "company=TestCo" -F "project_type=AI" -F "message=Test message"