sitemap-domain
它能做什么
这个技能检查站点地图中列出的地址是否存在域名、协议或 www 写法不一致的问题,并加以修正。它面向更换域名、从 HTTP 迁移到 HTTPS,或更改 www 设置的网站。
适用场景
- ✓你请智能体检查站点地图中的地址是否与你当前域名一致的时候。
- ✓你最近从 HTTP 迁移到 HTTPS 或更改了域名的时候。
- ✓你提交的站点地图在 Search Console 中显示覆盖率很低的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/sitemap-domain/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我们迁移到了 HTTPS 和新域名,Search Console 显示覆盖率很低。请帮我检查站点地图中的网址是否使用了正确的域名吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会读取站点地图中的每个 loc 条目,并将其协议和主机名与站点地图自身的地址进行比较。它会标出不一致的地方,例如旧域名、HTTP 地址或错误的 www 写法,并将其更新为规范版本。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Keep sitemap URLs on the correct domain
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.
Quick Reference
- Every
<loc>URL must use the same domain and protocol (https://www.example.com) as the sitemap file itself - Cross-domain URLs in a sitemap are ignored by Google
- Mixing
http://andhttps://URLs in one sitemap creates conflicting signals - Mixing
wwwand non-wwwvariants indicates a canonicalization issue to fix first
Check
Parse 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.
Fix
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
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.
Code Review
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/rules/seo/sitemap-domain
常见问题
为什么 Google 会跳过一些站点地图条目?
这个技能说,Google 会忽略那些无法验证为你所有的域名下的网址,因此这些页面无法从站点地图中获益。
混用 www 和非 www 的网址说明什么?
这个技能说,它表明存在规范化问题,应先解决。
修复之后应该做什么?
这个技能建议重新生成站点地图,并重新提交。
详情
作者的原始描述
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 submission reports low coverage.
热度
- GitHub 星标
- 75k
- 排名
- #3022
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。