# HTTP 状态码与爬虫

> 2xx 不保证被索引；301 是强重定向信号，302 是弱信号。4xx（429 除外）的 URL 不会被索引。5xx 和 429 让抓取放慢，已索引 URL 最终也会被移除。不要用 401 或 403 限速。

- URL: https://geo.casa/zh-cn/implementation/http-status-crawlers/
- 参考 · 官方文档已说明
- 审核于: 2026-10-25

## 概览

| 状态码 | Google 爬虫的处理 |
|---|---|
| 2xx | 内容进入索引候选，但不保证被索引 |
| 301 | 跟随；强信号，表示应处理目标 |
| 302 | 跟随；弱信号 |
| 4xx（429 除外） | 不索引；已索引的 URL 被移除；抓取放慢 |
| 429、5xx | 抓取放慢；已索引的 URL 保留一段时间，最终被移除 |

## 2xx

> **官方文档已说明:**
> 「对于 Google 搜索，HTTP 2xx（成功）状态码并不保证会被编入索引。」有些 2xx 页面的内容看起来像错误，比如空白页面或错误信息。Search Console 会把它们报告为软 404。
>
> 参考来源: [Google: How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes)

## 3xx

> **官方文档已说明:**
> 对于 301，Google 会跟随重定向，并把它当作「应处理重定向目标的强信号」。对于 302，Google 也会跟随，但只当作弱信号。
>
> 参考来源: [Google: How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes)

## 4xx

> **官方文档已说明:**
> 「Google 不会将返回 4xx 状态码的 URL 编入索引」。已被索引的 URL 开始返回 4xx 后会被移除。除 429 外，所有 4xx 错误处理方式相同，且对抓取速度没有影响。所以不要用 401 和 403 来限制抓取速度。
>
> 参考来源: [Google: How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes)

## 429 和 5xx

> **官方文档已说明:**
> 「5xx 和 429 服务器错误会促使 Google 爬虫暂时放慢抓取。」已被索引的 URL 会在索引中保留一段时间，但最终会被移除。服务器重新返回 2xx 后，Google 会逐步提高抓取速度。
>
> 参考来源: [Google: How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes)

## 对 AI 搜索的意义

Google 的 AI 功能使用同一个索引（[Google 搜索的工作原理](https://geo.casa/zh-cn/foundations/how-google-search-works/)）。因 4xx 或长时间 5xx 而失败的页面，会和传统结果一起从 AI 概览中消失。机器人防护层用 403 或 429 回应爬虫，效果与服务器错误相同，见 [AI 搜索可访问性检查](https://geo.casa/zh-cn/playbooks/ai-search-access-audit/)。

## 参考来源

- [Google: How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes)
