跳到正文
Skillpedia
SEO75k · #2891

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

可直接粘贴的消息

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

可以这样问 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; noindex blocks indexing — they are different mechanisms and should not be applied together
  • A page blocked in robots.txt cannot receive a noindex directive because crawlers never read the page
  • Canonical tags pointing to a noindex page 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

  1. 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 noindex so crawlers can read it.
    • If you want to block all crawling: remove noindex (irrelevant if not crawled); keep the robots.txt block.
  2. Identify canonical tags pointing to noindex pages:
    • The canonical-url destination must be an indexable page.
    • Change the canonical-url to point to an indexable URL, or remove noindex from the destination.
  3. Identify pages with both index and noindex in meta robots (from different tags or sources):
    • Google uses the most restrictive directive; resolve to a single clear intent.
  4. 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.

repo: thedaviddias/Front-End-Checklist

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能