noindex、robots.txt Disallow、canonical 分别管什么?
三个东西管的是三件事:noindex 管“要不要出现在搜索结果里”,robots.txt Disallow 管“爬虫能不能来取这页”,canonical 管“几个相同的网址以哪个为准”。Google 的官方文档(2026-11-10 查看)写得很清楚;AI 爬虫那一列,官方文档写明的很少,没写明的我们如实标“未写明”。
| 写法 | Google 官方文档怎么说 | AI 爬虫的官方文档怎么说 |
|---|---|---|
| noindex(meta robots 或 X-Robots-Tag) | 意思是“Do not show this page, media, or resource in search results”;页面必须能被抓到,Google 才看得到这条规则(robots meta 文档,页面标 2026-03-24 更新) | 未写明:OpenAI、Perplexity、Anthropic 的爬虫文档只讲 robots.txt,没有提 noindex 或 X-Robots-Tag(2026-11-10 逐页查看) |
| robots.txt Disallow | 控制抓取,不是把页面挡在 Google 之外的机制;被禁抓的页面如果有别的站链接,仍可能被收录;还会让 Google 读不到页里的 noindex(robots.txt 介绍页,2025-12-10 更新) | 这是它们文档里唯一写明的控制方式:OpenAI 写搜索侧改动约 24 小时生效,ChatGPT-User 由用户触发、规则“可能不适用”;Perplexity-User 一般不遵守;Anthropic 写明三个爬虫都遵守 robots.txt |
| rel=canonical | “A strong signal”,是强信号不是命令;同站内不建议用 noindex 去选规范页,也不要用 robots.txt 做规范化(合并重复网址文档,2026-07-10 更新) | 未写明:三家文档都没有提 canonical |
读法:如果你想让页面不出现在 Google 结果里,用 noindex,并且别用 robots.txt 拦这页。如果你想让页面不被 AI 爬虫使用,官方文档写明能管的只有 robots.txt;noindex 对它们有没有用,是未核实。robots.txt 的写法见 AI 爬虫的 robots.txt 怎么写?,canonical 的用法见 canonical 和重复内容:多语言站怎么配,才不被当成重复页?。
哪些页该 noindex,哪些不该?
下面是我们的判断方法,不是官方规定。核心问题只有一个:这页对用户有用,但对搜索来说没有独特内容吗?
| 页面类型 | 做法 | 为什么 |
|---|---|---|
| 有用但没有独特内容的条目页(我们的产品库里没有完整分析的产品页) | noindex, follow,不进 sitemap,页面保留 | 页面对站内用户有用,但和别处的内容没有区别,进搜索结果只会稀释整站 |
| 内容是另一种语言的页(gammaslide.com 的 ar / fa / ru 演示回放页,播放的是别的语言的录制) | noindex,自己的 canonical,不进 sitemap | 页面语言和网址语言不一致,用那种语言搜索的人读不懂 |
| 站内搜索结果、排序和筛选参数页 | robots.txt 禁抓参数,或 noindex | 数量几乎无限,且和列表页内容重复;notion.com 和 framer.com 的 robots.txt 都这么写(见下) |
| 同一内容的多个网址(带斜杠和不带、带参数和不带) | canonical,不用 noindex | Google 文档建议用 canonical 选规范页,不用 noindex |
| 已经删除的内容 | 返回 404 或 410 | 内容已经不存在,不是薄内容,不需要 noindex |
| 账户、结账、后台 | 要登录,并用 robots.txt 禁抓 | 不是内容页,爬虫抓了没有用 |
已删除内容的状态码怎么选,见 HTTP 状态码对 AI 爬虫有什么影响?404、410、301、429、5xx。
2026-11-10 我们看了两个大站的 robots.txt(只是文字,不是爬虫行为):notion.com 对所有爬虫禁 /templates/search?query=*;framer.com 对所有爬虫禁带 ?sort=、?query=、?tab=、?language= 等参数的网址。都是“搜索和筛选结果不让爬”,列表页和详情页本身不拦。
我们自己哪些页是 noindex?
两处,都是 2026-11-10 用 curl 直接取的响应,原样如下:
$ curl -s https://kagentx.com/p/research-stammer | grep -i '<meta name="robots"' <meta name="robots" content="noindex, follow" /> $ curl -s https://kagentx.com/p/lindy | grep -i '<meta name="robots"' (no output: no robots meta, indexable by default) $ curl -s https://gammaslide.com/ar/demo/launch-plan | grep -i '<meta name="robots"' <meta name="robots" content="noindex" />
| 网址 | 结果(2026-11-10) | 为什么 |
|---|---|---|
| kagentx.com/p/research-stammer | HTTP 200,<meta name="robots" content="noindex, follow" />,canonical 指向自己 | 没有完整分析的产品页 |
| kagentx.com/p/lindy | HTTP 200,没有 robots meta,也没有 X-Robots-Tag 响应头 | 有完整分析的产品页,可收录 |
| gammaslide.com/ar/、/fa/、/ru/ 的 demo/launch-plan | HTTP 200,<meta name="robots" content="noindex" />,自己的 canonical;这三种语言的 /demo/ 地址一个都不在 sitemap.xml 里 | 播放的是别的语言的录制,有意不收录 |
| gammaslide.com 的 /ja/、/zh-hans/ demo/launch-plan | HTTP 200,没有 robots meta | 内容语言和网址一致,可收录 |
kagentx 产品库一共 1,155 个产品,其中 141 个有完整分析(判断、价值链、竞争、风险四节),这 141 个页允许收录,也是 kagentx.com/agents/ 列表和 sitemap.xml 里出现的数量(2026-11-10 数过,各 141);其余 1,014 个页能打开,但标 noindex、不进 sitemap。这个设计在 2026-10-21 和 10-28 定下来,规则写在构建脚本的开头注释里。
这些 noindex 页有没有被 ChatGPT、Perplexity、Claude 读到或引用,我们没有证据,也没有做实验。我们确定的只有页面本身返回了什么。
Search Console 把这些页列为“被 noindex 排除”,要处理吗?
不用处理。你自己标了 noindex 的页,出现在“未编入索引”的列表里,是预期结果,不是故障。该看的是反方向:
1. 导出被 noindex 排除的网址列表
在 Search Console 的页面索引报告里按这个原因筛选。报告里具体的文字以你账号里显示的为准,我们没有逐项核对。
2. 和你“有意 noindex”的清单对一遍
列表里每个网址都应该在你的清单里。多出来的,说明有页面被误标了。
3. 再看该收录的页
重要页面不应出现在这个原因里。出现了,先检查是不是模板里把 noindex 带到了所有页。
怎么给一批薄内容页加 noindex?
1. 先分类
按上面的表,把页面分成:补成有内容、noindex、canonical 合并、删除。不要整站一刀切。
2. 在服务端 HTML 里写 noindex
写在
的 meta robots 里,或者用 X-Robots-Tag 响应头。不要靠前端脚本加:多数 AI 爬虫不执行 JavaScript,见 AI 爬虫会执行 JavaScript 吗?。3. 不要同时用 robots.txt 拦这些页
拦了,Google 就读不到 noindex。让爬虫能抓到页面,再靠 noindex 挡收录。
4. 从 sitemap 里拿掉这些页
sitemap 只放希望被收录的网址。sitemap 日期的写法见 sitemap 的 lastmod 怎么写才可信?。
5. 用 curl 验证
对每一类页面各取一个网址,确认响应里有 noindex,并且 robots.txt 没有拦它:
# Is the noindex in the HTML the crawler gets (not added by JavaScript)? curl -s https://example.com/some-page | grep -io '<meta name="robots"[^>]*>' # Or sent as a header? curl -sI https://example.com/some-page | grep -i x-robots-tag # The same URL must NOT be blocked in robots.txt, or crawlers never see the tag curl -s https://example.com/robots.txt | grep -i -B1 -A1 "some-page"
6. 两周后回看
看 Search Console 里被排除的数量和你的清单是否一致,也可以用 AI 爬虫检查 看 robots.txt 有没有误拦 AI 爬虫。薄内容页太多时对抓取量的影响见 AI 爬虫会抓太多吗?Crawl-delay 哪些爬虫认。
另一类和“哪些页该被别人读到”有关的问题,见 GPT Store 和 AI Agent 目录能带来 AI 推荐吗?:目录页读得到不等于被引用。
常见问题
薄内容页一定要 noindex 吗?
不一定。先问这页对用户有没有用、能不能补成有独特内容的页。补得出来就补;补不出来、但页面对用户还有用(比如产品条目、其他语言的播放页),用 noindex 让它留在站里、不进搜索结果。
noindex 的页面,AI 爬虫还会读吗?
官方没有说明。OpenAI、Perplexity、Anthropic 的爬虫文档只写了 robots.txt,没有提 noindex,所以各家是否遵守 meta robots 的 noindex,我们未核实。可以确定的是:对 Google,noindex 是官方文档写明的“不在搜索结果中显示”。
robots.txt Disallow 加 noindex,是不是双保险?
不是,反而会失效。Google 官方说明,页面被 robots.txt 禁止抓取时,它看不到页面里的 meta robots 和 X-Robots-Tag,noindex 会被忽略;被禁抓的页面如果有别的站链接,仍可能被收录。要挡收录,只用 noindex,并让爬虫能抓到这页。
Search Console 里一堆页面显示被 noindex 排除,是故障吗?
如果这些页是你有意标成 noindex 的,就是预期结果,不是故障。要看的是反过来的情况:该收录的页面出现在这个原因里,说明 noindex 误加到了不该加的页面上。
noindex 页面要不要从 sitemap 里去掉?
要。sitemap 是告诉爬虫“这些页希望被收录”,放进 noindex 页会发出互相矛盾的信号。kagentx 的做法是 noindex 页不进 sitemap。
出处
- Google · Robots meta tag, data-nosnippet, and X-Robots-Tag specifications (2026-11-10 查看,页面标 2026-03-24 更新)
- Google · Introduction to robots.txt (2026-11-10 查看,页面标 2025-12-10 更新)
- Google · What is URL canonicalization (2026-11-10 查看,页面标 2026-07-10 更新)
- OpenAI · Overview of OpenAI Crawlers (查看于 2026-11-10)
- Perplexity · Perplexity Crawlers (查看于 2026-11-10)
- Anthropic · Does Anthropic crawl data from the web (查看于 2026-11-10)
- kagentx · kagentx.com/p/research-stammer (2026-11-10 读取)
- kagentx · kagentx.com/p/lindy (2026-11-10 读取)
- kagentx 评测:案例页的数据,日期写在每个例子里。