indexability-conflicts
它能做什么
这项技能检查网站是否向搜索引擎发出了关于哪些页面应被抓取和索引的矛盾信号。适用于网站所有者和 SEO 专业人员。
适用场景
- ✓当你希望隐藏的页面仍出现在搜索结果中的时候。
- ✓当你的 robots.txt 文件与页面标签似乎相互矛盾的时候。
- ✓当 canonical 标签指向一个标记了 noindex 的页面的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/indexability-conflicts/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请检查我的网站是否有相互冲突的搜索引擎指令。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会为每个页面比较 robots.txt 规则、robots meta 标签、X-Robots-Tag 标头和 canonical 链接。它会标记发出矛盾信息的组合,并建议一个明确的设置。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Avoid conflicting indexability signals
Conflicting indexability directives create unpredictable crawling and indexing behaviour. The most dangerous combination is robots.txt blocking a page that also has a noindex tag — the noindex is never read, but the URL is still known to Google, leaving it in a limbo state that wastes crawl budget.
Quick Reference
- robots.txt blocks crawling;
noindexblocks indexing — they are different mechanisms and should not be applied together - A page blocked in robots.txt cannot receive a
noindexdirective because crawlers never read the page - Canonical tags pointing to a
noindexpage create an unresolvable conflict — canonicalise to an indexable URL instead
Check
For each page, collect four signals: (1) Is the URL path blocked by robots.txt? (2) Does the page HTML contain <meta name='robots' content='noindex'>? (3) Does the HTTP response include an X-Robots-Tag: noindex header? (4) Does the page's <link rel='canonical'> point to a different URL? Flag: pages blocked in robots.txt that also have noindex directives, pages with canonical pointing to a noindex URL, and pages with conflicting index/noindex signals from meta and HTTP header.
Fix
- Identify all pages where robots.txt blocks crawling AND the page also has
noindex:- If you want the page excluded from the index: remove the robots.txt rule; keep the
noindexso crawlers can read it. - If you want to block all crawling: remove
noindex(irrelevant if not crawled); keep the robots.txt block.
- If you want the page excluded from the index: remove the robots.txt rule; keep the
- Identify canonical tags pointing to
noindexpages:- The canonical-url destination must be an indexable page.
- Change the canonical-url to point to an indexable URL, or remove
noindexfrom the destination.
- Identify pages with both
indexandnoindexin meta robots (from different tags or sources):- Google uses the most restrictive directive; resolve to a single clear intent.
- Verify after fixing using Google Search Console URL Inspection for each affected page.
Explain
robots.txt is a crawl directive; noindex is an indexing directive. They operate at different stages of Google's pipeline. A page blocked in robots.txt is never fetched, so its noindex tag is never read — yet the URL is still known from sitemaps or links, keeping it in a crawl ambiguity state. Google's documentation explicitly warns against blocking pages in robots.txt that you also want to declare as noindex.
Code Review
Programmatically fetch robots.txt and parse its Disallow rules. For each page URL, determine if it matches a Disallow pattern. If yes, fetch the page HTML and check for <meta name='robots'> tags — flag if noindex is present. Also check the X-Robots-Tag HTTP response header for conflicts with the meta tag. Report the specific conflict type for each flagged URL.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/seo/indexability-conflicts
常见问题
robots.txt 加 noindex 为什么是个问题?
这项技能指出,搜索引擎无法读取被禁止抓取的页面上的 noindex 标签,因此这一指令永远不会被看到。
canonical 链接应指向哪里?
这项技能指出,canonical 链接应指向可被索引的页面,而不是 noindex 页面。
阻止抓取和阻止索引有什么区别?
这项技能指出,robots.txt 阻止抓取,noindex 阻止索引。它们是不同的工具,不应同时用在同一个页面上。
详情
作者的原始描述
Use when auditing a site for indexability issues, investigating why pages appear in Google's index that should be excluded (or vice versa), or reviewing robots.txt and meta robots configurations for consistency.
热度
- GitHub 星标
- 75k
- 排名
- #2891
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。