跳到正文
Skillpedia
SEO75k · #3022

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/sitemap-domain/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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:// and https:// URLs in one sitemap creates conflicting signals
  • Mixing www and non-www variants 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.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#3022
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能