← Knowledge Notes
Global Growth / Knowledge note · Chinese

GSC Blog: Robots / Sitemap / Canonical / Hreflang / Indexing API(2016-2026)

Google Search Central blog 15 篇 robots.txt 标准化 / sitemap 最佳实践 / canonical 错误 / hreflang 实战 / Indexing API 的主题化提炼。

Source collection:Google 搜索与 SEO · Published here:2026-09-26

SEO搜索引擎自然增长

跨 11 年(2018-2025)15 篇 Google Search Central blog 的主题化提炼。覆盖:①robots.txt 从「Google 内部规则」走向「IETF RFC 9309 国际标准」的全过程 ②sitemap 协议持续做减法(ping/extension tags/changefreq/priority 全废)③page-level controls(meta tag + X-Robots-Tag + indexifembedded)的扩展 ④nofollow 从硬规则变 hint + 引入 sponsored/ugc ⑤Indexing API 严格的两类边界(仅 job posting + livestream)。

跨篇主旋律 3 条:(1) 「不支持就是不支持」 — Google 公开承认从未文档化的 noindex/crawl-delay/nofollow 在 robots.txt 里不工作,2019-09-01 起源码移除;(2) 「ping 端点死透」 — sitemap ping、sitelinks search box、image/video sitemap 多数 extension tags 在 2022-2024 间集中废弃,体现 Google 对低信噪比信号一律砍掉的偏好;(3) 「Indexing API 不是给你索引一切用的」 — 只接 job posting 和 livestream 两类短生命周期 URL,其它场景没有 API 入口。


Part 1 — robots.txt 标准化:2019 IETF + 2024 refresher 系列

1.1 时间线(最重要的一张图)

年份 事件 来源
1994 robots.txt 诞生(早于 Google 4 年) 2025/02 intro-robots-refresher
2005 Sitemaps Protocol 发布 2023/06 sitemaps-lastmod-ping
2007 主流搜索引擎统一支持 robots.txt 里的 sitemap 指令 2025/02 intro-robots-refresher
2019-07-01 Google 开源生产 robots.txt parser(C++) 2019/07 unsupported-rules
2019-07-02 Google 公告:不支持的指令 9-01 起从代码移除 2019/07 unsupported-rules
2019-09-01 noindex / crawl-delay / nofollow 在 robots.txt 里彻底失效 2019/07 unsupported-rules
2020-09 实习生贡献 Java port + 测试框架 2020/09 open-source-projects
2022 robots.txt 成为 IETF RFC 9309 2025/02 intro-robots-refresher
2025-02 Robots Refresher 系列开篇 2025/02 intro-robots-refresher
2025-03 Refresher 3 篇连发(flexible / page-level / future-proof) 2025/03 三篇

1.2 关键事实:robots.txt 里这些指令 Google 从未支持过

2019/07 原话:「Since these rules were never documented by Google, naturally, their usage in relation to Googlebot is very low. Digging further, we saw their usage was contradicted by other rules in all but 0.001% of all robots.txt files on the internet.」

被砍 / 不支持清单:

  • noindex(在 robots.txt 里)— Google 从未文档化,2019-09-01 起代码移除
  • crawl-delay — Google 不支持,但其他引擎可能支持
  • nofollow(在 robots.txt 里)— 同上
  • clean-param — 2025/03 robots-future 提到「不在 RFC 9309,但有些引擎支持,Google Search 不支持」

替代 noindex 的 5 个正确做法(2019/07):

  1. robots meta tag 里的 noindex(最有效的去索引方式,前提:允许爬)
  2. HTTP 404 / 410
  3. 密码保护
  4. robots.txt Disallow(不让爬就大概率不被索引,但因外链仍可能进索引——只是会越来越不可见)
  5. Search Console Remove URL tool(临时移除)

1.3 RFC 9309 之外可扩展的"事实标准"

2025/03 robots-future 原话:「The "sitemap" rule, which again is not part of RFC9309, is supported by all major search engines. Given enough support, it could become an official rule in the REP.」

如何让一个新指令成为标准(Gary Illyes 的话):

  1. 公开讨论你的想法(unilateral 实现不算标准)
  2. 让 publisher 和 crawler 两端都看到收益
  3. 共识到位 → 才有更新 RFC 的可能
  4. 路径参考:sitemap 指令 2007 年自下而上获得共识

1.4 Robots Refresher 系列(2025 三篇)的核心论点

篇章 核心论点
2025/02 intro robots.txt 比 Google 还老(1994 vs 1998),是「essential tool that enables the internet to work」,2022 才进 IETF 但生效已 28 年
2025/03 flexible robots.txt 是「Swiss Army knife」,给了 5 个常用模式(多 bot 共享规则 / 路径含特定字符串 / allow + disallow 组合 / 单独屏蔽 AI trainer bot / # 注释)
2025/03 page-level robots meta tag 1996 年由 W3C 提出(早于 Google),后来扩展出 X-Robots-Tag HTTP header;HTML 之外(PDF/图片/文档)必须用 header
2025/03 future REP 可以"长大",但门槛要高;公开讨论 + 双边共识 + 长期使用 = 标准化路径

1.5 选择 robots.txt vs page-level:何时用哪个(2025/03 page-level)

场景 工具
想阻止"爬"行为本身(如无尽搜索结果页) 只能 robots.txt
FTP 服务器控制 只能 robots.txt
不想显示 snippet 只能 page-level(nosnippet)
不区分爬 vs 索引、且要广泛屏蔽 robots.txt(粒度粗)
单页控制 page-level meta tag / X-Robots-Tag

1.6 屏蔽 AI 训练 bot 的官方写法(2025/03 flexible 给的范例)

user-agent: *
allow: /

user-agent: aicorp-trainer-bot
disallow: /
allow: /$

— 含义:除主页外,aicorp-trainer-bot 不能爬任何路径。

1.7 开源 robots.txt 生态(2020/09)

  • C++ parser(2019 开源)— Google 生产系统同款
  • Java port(2020/09)— Google 内部团队"已经计划在生产系统使用"
  • robots.txt-spec-test(2020/09)— 实习生 Andreea Dutulescu 的测试框架,验证任意 parser 是否符合 REP

Part 2 — Sitemap 最佳实践演化

2.1 Sitemap 协议的「持续做减法」

年份 被废弃的东西 现状
2022-05 Image sitemap: caption / geo_location / title / license 2022-08-06 后无效;改用 alt text + IPTC metadata
2022-05 Video sitemap: category / player_loc[@allow_embed] / player_loc[@autoplay] / gallery_loc / price[@all] / tvshow[@all] 同上
2023-06 Sitemap ping endpoint 6 个月后 404,"vast majority of submissions lead to spam"(Bing 同步废弃)
持续 changefreq Google 完全不使用,且和 lastmod 概念重叠
持续 priority Google 完全不使用,"based on internal studies, it generally doesn't accurately reflect actual priority"

2.2 lastmod 是 sitemap 里唯一被 Google 当真的元素

2023/06 原话:「lastmod is indeed useful in many cases and we're using it as a signal for scheduling crawls to URLs that we previously discovered.」

lastmod 正确用法 4 条:

  1. 格式必须合规(sitemaps.org 文档;Search Console 会报错)
  2. 必须匹配现实 — 「if your page changed 7 years ago, but you're telling us in the lastmod element that it changed yesterday, eventually we're not going to believe you anymore」
  3. 可以只为有把握的页填 — homepage / category page 这种聚合页不知道真实修改时间,宁可不填
  4. 必须是"显著修改" — 「last significant modification」;改 sidebar/footer 不算;改正文/结构化数据/链接才更新

2.3 Sitemap 提交方式(2023-06 后唯一两条路)

  • robots.txt 里加 Sitemap: 指令
  • Search Console 手动提交

被砍:unauthenticated REST ping endpoint(http://www.google.com/ping?sitemap=...)。代码不用改,调用就是 404。

2.4 一个奇怪但 working as intended 的小坑

xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" 用的是 HTTP 不是 HTTPS。

2023/06 原话:「This is working as intended: it's a reference for parsers about the elements in the XML. Please don't file more documentation feedback about this.」


Part 3 — rel=canonical 常见错误 5 大类

注:本批 15 篇 blog 没有专题讲 canonical 错误的(专题在姐妹 wiki gsc-canonical-and-migration.md),但多篇间接踩到 canonical 议题,这里聚合相关一手论述。

3.1 canonical / noindex / 索引信号的优先级(多篇交叉)

信号 强度 失效条件
404 / 410 最强去索引 爬到才生效
password protection 强 不依赖爬
robots meta noindex 强 必须允许爬到该页(被 robots.txt 屏蔽时看不到 meta)
X-Robots-Tag: noindex(HTTP header) 同上 同上;适用于 PDF/图片
robots.txt Disallow 弱去索引(防爬而已) 外链多时 URL 仍可能进索引但无 snippet
robots.txt noindex(已废) 已无效 2019-09-01 后代码不识别

3.2 容易混淆:robots.txt 屏蔽 ≠ 不索引

2021/01 Index Coverage Data Improvements 原话:「Pages that were submitted but blocked by robots.txt and got indexed are now reported as 'indexed but blocked' (warning) instead of 'submitted but blocked' (error).」

— Google 自己在 Search Console 里也把这事归类为「warning」而非「error」,承认:被 robots.txt 屏蔽的页 依然可能进索引(基于外链),只是没法读到内容。

3.3 indexifembedded:新场景下的索引精细化(2022/01)

场景:媒体出版商希望 iframe 嵌入第三方页时被索引,但不希望原始播放页本身被索引。

在 2022/01 之前:单独的 noindex 会让 Google 在第三方页索引时也读不到 iframe 内容。

新解法:

<meta name="googlebot" content="noindex,indexifembedded">

或 HTTP header:

X-Robots-Tag: googlebot:noindex,indexifembedded

注意:只有 Google 支持 indexifembedded。

3.4 "indexed without content" — 新的诊断类目(2021/01)

Index Coverage 报告新增 indexed without content(warning)— 页被索引了但 Google 读不到内容(常见:渲染失败 / JS 没跑通 / cloaking)。

3.5 Soft 404 报告更准 + crawl anomaly 这个垃圾箱被砍(2021/01)

  • 移除 generic "crawl anomaly" — 全部细分到具体 issue
  • Soft 404 报告精度提升

2021/01 原话:「all crawls errors should now be mapped to an issue with a finer resolution.」


Part 4 — Hreflang 实战

重要说明:本批 15 篇 blog 没有专门讲 hreflang 的(hreflang 专题文章在 2014/2018 早期,已归入姐妹 wiki gsc-international-and-explicit.md)。本节仅记录这批 15 篇里间接相关的一点信息,供 cross-reference。

4.1 多区域 / 多语言爬取的诊断入口

2020/11 Crawl Stats Report 的「domain properties + multiple hosts」支持,是检查跨语言子域名爬取健康度的入口:

2020/11 原话:「For domain properties with multiple hosts, you can check the host status for each of the top hosts presented in the report summary view. This can help you evaluate performance of all hosts under your domain in one place.」

— 跨语言/区域常用子域名(fr.example.com / de.example.com),需要在 domain property 视角看每个 host 的 host status。

4.2 hreflang 详情请见

→ wiki/gsc-international-and-explicit.md → wiki/gsc-canonical-and-migration.md


Part 5 — Indexing API(job posting / livestream 边界)

5.1 严格边界:Indexing API 只接两类内容

2018/06 原话:「Currently, the Indexing API can only be used for job posting pages that include job posting structured data.」

2018/12 原话:「The Indexing API now supports pages with livestream structured data.」

5 年后状态(截至本批文档):仍只支持这两类。没有通用 Indexing API 让你 push 任意 URL 给 Google。

5.2 为什么只给这两类

  • 共同点:短生命周期 URL(job posting 招满即下架 / livestream 开始-结束有时间窗)
  • 痛点:crawl schedule 跟不上 → 用户点进来是过期内容
  • 解法:site owner 主动 push notification,让 Google 安排 fresh crawl

2018/06 原话:「For websites with many short-lived pages like job postings, the Indexing API keeps job postings fresh in Search results because it allows updates to be pushed individually.」

5.3 调用时机

  • Job posting:发布时调 + 下架时调(两个 endpoint)
  • Livestream:开始时调 + 结束时调 + 结构化数据变化时调(2018/12 明确)

5.4 前提条件

  • 页面必须含对应结构化数据(JobPosting / VideoObject + livestream guidelines)
  • 否则 API 调了也没用

5.5 隐含红线

— 任何非 job posting / 非 livestream 的页用 Indexing API 都属"滥用",长期看会被限流。这条 Google 没明说,但社区多年实战共识。


Part 6 — noindex / nofollow 演化

6.1 nofollow 从「硬规则」变「hint」的关键时间点(2019/09 + 跨篇)

阶段 时间 nofollow 的语义
2005-2019 nofollow 引入对抗 comment spam 硬规则:被标的链不计入排名信号
2019-09-10 起 引入 sponsored / ugc 两个新 rel 值 nofollow 变 hint(用于排名场景)
2020-03-01 起 爬取/索引层 nofollow 也变 hint(不再当硬规则)

6.2 三个 rel 值的语义边界(2019/09)

rel 值 用途
rel="sponsored" 广告 / 赞助 / 补偿协议产生的链接
rel="ugc" 用户生成内容里的链接(评论 / 论坛)
rel="nofollow" 不想暗示任何 endorsement(兜底)

6.3 FAQ 核心结论(2019/09)

  • 现有 nofollow 不需要改
  • 可以多个 rel 组合:rel="nofollow ugc" / rel="ugc sponsored"
  • 广告链该不该标?必须标(用 sponsored 或 nofollow,否则 link scheme penalty)
  • 标错怎么办?只有「sponsored」是有方向性的错 — 非广告标 sponsored 后果是「不算 endorsement credit」,没大伤害;反过来,广告不标 sponsored/nofollow 才是大问题
  • 为什么从「忽略」变「hint」?— 「Links contain valuable information that can help us improve search, such as how the words within links describe content they point at.」(即使是 nofollow 的链,anchor text 也有信号价值)

6.4 noindex 的演化

时间 事件
历史 noindex 在 robots.txt 里被 Google 从未支持但很多人误用
2019-09-01 代码完全移除对 robots.txt 里 noindex 的处理
2022-01 引入 indexifembedded,让 noindex 可以"网开一面"
2025-03 page-level granularity 篇明确:noindex 是 1996 年提出的,比 Google 还老

6.5 noodp 这种过时值(2025/03 page-level)

原话:「sometimes values are deprecated, as was the case with noodp, which used snippets from DMOZ / Open Directory Project before the directory was closed.」

— 提醒:robots meta 的支持值清单不是一成不变的,会增也会减。


虽不直接属 6 大主题,但反映 Google 对"低使用率特性"一律砍掉的偏好:

  • 2014/09 引入
  • 2024/11/21 全面下线
  • 全球生效,不影响排名
  • 结构化数据可保留,不会报错
  • WebSite 结构化数据仍然支持(site names 用同一个 schema 变体)

附录 B — Index Coverage Report 进化(2021/01)

老 issue 新 issue 类型变化
crawl anomaly(垃圾桶) 被细分到具体 issue —
submitted but blocked(error) indexed but blocked(warning) error → warning
— indexed without content 新增 warning
Soft 404 报告 精度提升 —

附录 C — Crawl Stats Report v2(2020/11)核心新能力

  1. Total requests by response code / file type / crawl purpose / Googlebot type
  2. Host status 详细信息(90 天可用性)
  3. URL examples(哪里被请求)
  4. Domain properties 多 host 综合视图

跨篇关键金句汇总

  1. 「[the unsupported rules' usage] was contradicted by other rules in all but 0.001% of all robots.txt files on the internet」(2019/07)— 砍掉 noindex 在 robots.txt 里的官方理由
  2. 「the vast majority of the submissions lead to spam」(2023/06)— 砍掉 sitemap ping 的官方理由
  3. 「if your page changed 7 years ago, but you're telling us in the lastmod element that it changed yesterday, eventually we're not going to believe you anymore」(2023/06)— lastmod 信任机制
  4. 「Links contain valuable information... By shifting to a hint model, we no longer lose this important information」(2019/09)— nofollow 变 hint 的设计原因
  5. 「robots.txt is here to stay... it's easy, it's granular and expressive, it's well-understood and accepted, and it just works, like it's been working for decades now.」(2025/02)— Google 对 robots.txt 长期承诺
  6. 「The most important thing you, the reader, can do is to talk about your idea publicly and gather supporters for that idea」(2025/03 future)— REP 扩展机制
  7. 「Currently, the Indexing API can only be used for job posting pages」(2018/06)— Indexing API 边界

作者分布

  • Gary Illyes ×6(2019/07 unsupported, 2019/09 nofollow co-author, 2020/09 open-source co-author, 2022/01 indexifembedded co-author, 2022/05 sitemap-cleaning, 2023/06 lastmod-ping, 2025/03 future)
  • John Mueller ×3(2024/10 sitelinks-searchbox, 2025/02 intro-refresher, 2025/03 page-level co-author, 2025/03 flexible co-author)
  • Martin Splitt ×1(2025/03 flexible co-author)
  • Danny Sullivan ×1(2019/09 nofollow co-author)
  • 其它:Zach Clifford / Danielle Marshak / Edu Pereda / Hillel Maoz / Tal Yadid / Weizi Wang 各 1

来源与关联资料