惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
N
Netflix TechBlog - Medium
WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
J
Java Code Geeks
V
Visual Studio Blog
H
Help Net Security
Engineering at Meta
Engineering at Meta
Hugging Face - Blog
Hugging Face - Blog
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
博客园 - 【当耐特】
B
Blog
Stack Overflow Blog
Stack Overflow Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
博客园 - 司徒正美
博客园 - 叶小钗
Y
Y Combinator Blog
MyScale Blog
MyScale Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
Google Developers Blog
酷 壳 – CoolShell
酷 壳 – CoolShell

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Verifying three custom domains in Google Search Console w...
MORINAGA · 2026-05-12 · via DEV Community

Before Google Search Console is useful — for indexing requests, coverage errors, or query data — you have to prove you own the domain. For three new custom domains on Astro sites, I did this in one afternoon. The fastest path was DNS TXT verification through Cloudflare, and there were a few non-obvious details worth writing down.

This is a short notes post, not a full tutorial. Google and Cloudflare both have step-by-step documentation. What follows is the things that tripped me up and what the console actually shows at day one.

DNS TXT vs HTML file for Astro SSG

Search Console offers four verification methods. For Astro sites deployed to Cloudflare Pages:

  • HTML file: Download a file, add to public/, commit, push, wait for deploy.
  • HTML meta tag: Modify the <head> layout component, commit, push, wait for deploy.
  • DNS TXT record: Add a record in Cloudflare DNS. No deploy needed.
  • Google Analytics or Search Console tag: Requires GA4 already wired up.

The DNS TXT method is clearly faster for static sites. You don't trigger a build, you don't wait for Cloudflare Pages CI, and you don't have to modify any source file. The TXT record propagates in minutes, and Search Console confirms it within a couple of minutes of Cloudflare showing the record as "Active."

One thing that confused me initially: DNS TXT verification proves ownership of the domain root, not of a specific path. A root domain verification covers all subdomains automatically, including www. That's broader coverage than the HTML file approach, which only verifies the exact URL where the file was placed.

Adding the record in Cloudflare

In Cloudflare's DNS dashboard: dash.cloudflare.com → [your domain] → DNS → Records → Add record. Record type is TXT, name is @ (the root), content is the string Search Console provides — something like google-site-verification=<long-string>.

Cloudflare defaults to TTL "Auto," which is 300 seconds. The record shows as "Active" in the Cloudflare dashboard almost immediately after saving. I verified each record was live with dig TXT yourdomain.com before clicking Verify in Search Console. Not strictly required, but it prevents wasting a verification attempt on propagation lag.

This is a per-domain operation. Each of the three sites needed its own Search Console property and its own TXT record. There's no bulk flow; you do it once per domain and move on.

Submitting sitemaps for @astrojs/sitemap output

After verification, submit the sitemap. For Astro sites using @astrojs/sitemap, the output at small site sizes is a /sitemap-0.xml file plus a /sitemap-index.xml that references it.

Submit the index file, not the shard: https://yourdomain.com/sitemap-index.xml. Search Console follows the index to discover the shards. Submitting a shard URL directly works, but you'd need to manually add each new shard if the site grows past the single-file limit (50,000 URLs). The index submission handles that automatically.

If Search Console shows "Couldn't fetch" on the sitemap, check two things: that your custom domain deployment is actually live (not still serving the *.pages.dev URL), and that robots.txt isn't accidentally blocking the /sitemap* path.

What the coverage report shows at day one

Almost nothing, which is expected.

Zero indexed pages is normal for a brand-new domain. Googlebot hasn't had time to crawl anything meaningfully — the custom domain records are fresh, and the sitemap was just submitted. All URLs will show as "Discovered — currently not indexed," which means Google knows the pages exist from the sitemap but hasn't crawled them yet.

The URL Inspection tool works immediately. You can paste any URL, click "Request Indexing," and Google queues a crawl for that specific page at elevated priority. I did this for the home page and top two or three category pages on each site. It's not the same as indexing — it just moves those specific URLs to the front of the crawl queue. Actual indexed status takes days to weeks.

Worth noting: IndexNow sends signals to Bing's index, not Google's. For Google, the URL Inspection request-indexing button is the only manual acceleration available. Running both is not redundant; they're independent crawlers.

The coverage report becomes genuinely useful after roughly a week, when errors start accumulating. The errors section is where you find 404s, redirect chain issues, canonical mismatches, and noindex tags that got applied by mistake. Those are all invisible until Googlebot actually visits. I'm planning to check each property weekly for the first month.

If you're running multiple sites, keep the Search Console properties separate rather than trying to look across them in one view. Error patterns for an AI tools directory and an indie games directory look completely different and would obscure each other if combined.


Part of an ongoing 6-month experiment running three AI-curated directory sites. The technical claims here are real; this article was AI-assisted.