noindex-in-sitemap
它能做什么
这个技能比较 XML 站点地图中的网址与页面上的 noindex 指令,并解决其中的冲突。它面向希望索引信号保持一致的网站所有者。
适用场景
- ✓你请智能体检查站点地图是否列出了不应被索引的页面的时候。
- ✓搜索结果缺少你预期的页面,并怀疑信号相互冲突的时候。
- ✓你在排查索引问题,需要确认站点地图与你想要索引的页面一致的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/noindex-in-sitemap/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我检查站点地图,并告诉我其中哪些已列出的页面同时被设置为 noindex 吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会读取站点地图,访问每个列出的网址,并检查 noindex 元标签或 X-Robots-Tag 响应头。然后它会报告冲突,并建议移除 noindex,或将该网址从站点地图中删除。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Noindex in Sitemap
Listing noindexed pages in your sitemap sends contradictory signals to Googlebot—it wastes crawl budget and may confuse Google into ignoring the noindex directive or spending crawl time on pages you don't want indexed.
Quick Reference
- Never include noindexed pages in your XML sitemap
- The sitemap and noindex directive send contradictory signals to crawlers
- Sitemaps should only list canonical-url, indexable, 200-status URLs
- Remove noindexed URLs from sitemap or remove the noindex directive—pick one
Check
Fetch the XML sitemap(s) and check each listed URL. For each URL, retrieve the page and check for <meta name='robots' content='noindex'> in the <head> or an X-Robots-Tag: noindex HTTP header. Report any URLs present in the sitemap that also carry a noindex directive.
Fix
For each URL that has a noindex directive AND appears in the sitemap: decide whether the page should be indexed. If yes — remove the noindex directive. If no — remove the URL from the sitemap. Never leave both in place.
Explain
The XML sitemap is a recommendation to search engines: 'please crawl and index these pages'. A noindex directive is an instruction: 'do not index this page'. Including noindexed pages in the sitemap creates a contradiction—Google will resolve it by following noindex, but the URL still gets crawled, wasting crawl budget.
Code Review
Fetch each URL in the XML sitemap. For each URL, check the HTTP response for X-Robots-Tag: noindex header, and check the rendered <head> for <meta name='robots' content='noindex'>. Report any URL that appears in the sitemap AND carries a noindex directive. Also check for sitemap entries returning non-200 status codes.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/seo/noindex-in-sitemap
常见问题
两者同时存在为什么是问题?
站点地图要求搜索引擎索引某个页面,而 noindex 标签却要求它们不要索引,这既浪费抓取资源,也会发出相互矛盾的信号。
应该保留哪一个?
这个技能说,先决定该页面是否应被索引,然后只保留与之匹配的设置,绝不两者都留着。
智能体能同时检查页面标签和响应头吗?
可以。这个技能同时检查 robots meta 标签和 X-Robots-Tag HTTP 响应头。
详情
作者的原始描述
Use when auditing an XML sitemap or diagnosing indexing issues. Applies to any site where noindex meta tags or X-Robots-Tag headers may be applied to URLs also listed in the sitemap.
热度
- GitHub 星标
- 75k
- 排名
- #2953
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。