Use when applies to sites that have recently migrated from HTTP to HTTPS, changed domain name, or have www/non-www redirect configurations. Use when sitemap sub
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-sitemap-domain-8c7fe88d48f5 ,按照其中的说明把「sitemap-domain」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Google ignores sitemap entries from domains it cannot verify as yours — cross-domain URLs are simply skipped, meaning those pages lose the crawl-discovery benefit of the sitemap.
<loc> URL must use the same domain and protocol (https://www.example.com) as the sitemap file itselfhttp:// and https:// URLs in one sitemap creates conflicting signalswww and non-www variants indicates a canonicalization issue to fix firstParse all <loc> values in the sitemap and extract the protocol and hostname. Flag any URL whose protocol or hostname differs from the sitemap's own URL. Common mismatches: http vs https, www vs non-www, old domain vs new domain.
Update all <loc> URLs to use the canonical-url protocol and hostname. If the site is on https://www.example.com, every sitemap URL must start with https://www.example.com/. Regenerate and resubmit the sitemap.
Explain why Google restricts sitemap URLs to the same domain, how cross-domain URLs are silently dropped, and how domain mismatches in a sitemap reveal underlying canonicalization problems.
Review metadata generation, rendered HTML, structured data, and response headers related to Keep sitemap URLs on the correct domain. Flag exact routes or templates where search-facing output violates the rule, and describe how to verify the final page output.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/en/rules/seo/sitemap-domain