🚀 Deployment System.
Deploy to Cloudflare Pages, connect custom domains, set up the no-index safeguard, and submit to search engines.
Cloudflare Pages vs Workers.
Cloudflare Pages is for static sites (HTML/CSS/JS only). Cloudflare Workers supports server-side logic. For micro-tools built with AstroJS (static output), Pages is the better choice — simpler setup, free tier, and optimized for static content.
Wrangler CLI setup and login.
Wrangler is Cloudflare's command-line tool for deploying. Install it and authenticate with your Cloudflare account.
# Install Wrangler
npm install wrangler@latest --save-dev
# Login to Cloudflare
npx wrangler login
# Browser opens → authorize → doneFirst deployment to pages.dev.
Tell your AI to deploy the site to Cloudflare Pages. It will configure the build and deploy automatically. You'll get a temporary URL like project-name.pages.dev for testing.
# Deploy command (add to package.json scripts)
"deploy": "npx wrangler pages deploy ./dist"
# Run deployment
npm run deployCustom domain connection.
Go to Cloudflare dashboard → your Pages project → Custom Domains → add your purchased domain. You'll need to update your domain's nameservers to Cloudflare's nameservers. Also add the www variant.
The "no-index" safeguard for duplicate content.
Your site is live on both your custom domain AND the pages.dev subdomain. This creates a duplicate content risk. Fix it by adding a _headers file that tells Google to ignore the pages.dev URL.
# Create /public/_headers file:
https://your-project.pages.dev/*
X-Robots-Tag: noindex
# WARNING: Use only the main pages.dev URL
# Do NOT use versioned URLs like abc123.pages.devGoogle Search Console setup.
Go to search.google.com/search-console, add your domain, verify via DNS TXT record in Cloudflare, submit your sitemap, and request indexing for your homepage. Data starts appearing within 2-3 days.
Bing Webmaster Tools import.
Go to bing.com/webmasters, sign in with Google, and use the one-click import from Google Search Console. This doubles your search presence with zero additional effort. Submit your URL for indexing.