HTTP 状态码查询 - 搜索和理解所有 HTTP 响应代码

即时搜索和浏览 50+ 种 HTTP 状态码,附带详细说明、真实使用场景和排错建议。所有操作在浏览器端完成,无需上传任何数据。

49 status codes found

100

Continue

The server has received the request headers and the client should proceed to send the request body.

101

Switching Protocols

The server is switching protocols as requested by the client via the Upgrade header.

102

Processing

The server has received and is processing the request, but no response is available yet.

103

Early Hints

Used to return some response headers before the final HTTP message.

200

OK

The request has succeeded. The meaning depends on the HTTP method used.

201

Created

The request has been fulfilled and has resulted in one or more new resources being created.

202

Accepted

The request has been accepted for processing, but the processing has not been completed.

203

Non-Authoritative Information

The returned metadata is not exactly the same as available from the origin server.

204

No Content

The server successfully processed the request and is not returning any content.

205

Reset Content

The server successfully processed the request and asks the client to reset the document view.

206

Partial Content

The server is delivering only part of the resource due to a range header sent by the client.

207

Multi-Status

A Multi-Status response conveys information about multiple resources.

300

Multiple Choices

The request has more than one possible response. The user or user agent should choose one.

301

Moved Permanently

The resource has been permanently moved to a new URL. Search engines transfer SEO value to the new URL.

302

Found

The resource is temporarily located at a different URL. The client should continue to use the original URL.

303

See Other

The response to the request can be found at another URL using a GET method.

304

Not Modified

The resource has not been modified since the last request. The client can use the cached version.

307

Temporary Redirect

The resource is temporarily at a different URL. Unlike 302, the method and body will not be changed.

308

Permanent Redirect

The resource has been permanently moved. Unlike 301, the method and body will not be changed.

400

Bad Request

The server cannot process the request due to malformed syntax or invalid request framing.

401

Unauthorized

The request requires authentication. The client must provide valid credentials.

402

Payment Required

Reserved for future use. Sometimes used for paywall or subscription-based APIs.

403

Forbidden

The server understood the request but refuses to authorize it. Authentication will not help.

404

Not Found

The server cannot find the requested resource. The URL may be incorrect or the resource may have been removed.

405

Method Not Allowed

The HTTP method used is not supported for this resource.

406

Not Acceptable

The server cannot produce a response matching the Accept headers sent by the client.

407

Proxy Authentication Required

The client must authenticate with the proxy before the request can proceed.

408

Request Timeout

The server timed out waiting for the client to send the complete request.

409

Conflict

The request conflicts with the current state of the resource on the server.

410

Gone

The resource has been permanently deleted and will not be available again. Unlike 404, this is intentional.

411

Length Required

The server requires a Content-Length header in the request.

412

Precondition Failed

One or more conditions in the request headers evaluated to false on the server.

413

Content Too Large

The request body is larger than the server is willing to process.

414

URI Too Long

The request URL is longer than the server can interpret.

415

Unsupported Media Type

The server does not support the media type of the request body.

416

Range Not Satisfiable

The range specified in the Range header cannot be fulfilled.

418

I'm a Teapot

The server refuses to brew coffee because it is a teapot (RFC 2324). An April Fools' joke that became a real standard.

422

Unprocessable Entity

The server understands the content type but is unable to process the contained instructions.

429

Too Many Requests

The client has sent too many requests in a given time window (rate limiting).

451

Unavailable For Legal Reasons

The resource is unavailable due to legal demands (censorship, court order).

500

Internal Server Error

A generic error indicating the server encountered an unexpected condition that prevented it from fulfilling the request.

501

Not Implemented

The server does not support the functionality required to fulfill the request.

502

Bad Gateway

The server, acting as a gateway, received an invalid response from the upstream server.

503

Service Unavailable

The server is currently unable to handle the request due to maintenance or overload.

504

Gateway Timeout

The server, acting as a gateway, did not receive a timely response from the upstream server.

505

HTTP Version Not Supported

The server does not support the HTTP protocol version used in the request.

507

Insufficient Storage

The server is unable to store the representation needed to complete the request.

508

Loop Detected

The server detected an infinite loop while processing the request.

511

Network Authentication Required

The client needs to authenticate to gain network access (captive portal).

Learn More

什么是 HTTP 状态码?

HTTP 状态码是服务器在响应客户端请求时返回的三位数字代码,用于告知请求的处理结果——成功、失败还是需要进一步操作。

状态码按首位数字分为五类:1xx(信息性)、2xx(成功)、3xx(重定向)、4xx(客户端错误)和 5xx(服务器错误)。每一类在 HTTP 协议中承担不同的职责。

理解这些状态码对 Web 开发者、运维工程师和 SEO 从业者至关重要。301 重定向可传递链接权重,429 表示触发了速率限制,503 则告诉搜索引擎稍后重试。本工具帮助你快速查找任意状态码并理解其在不同上下文中的含义。

使用方法

  1. 1浏览所有状态码,或使用分类标签按 1xx、2xx、3xx、4xx、5xx 筛选。
  2. 2在搜索框中输入状态码数字、名称或关键词,即时过滤结果。
  3. 3点击任意状态码卡片展开查看常见使用场景。
  4. 4参考分类说明理解每组状态码的作用。
  5. 5遇到不熟悉的 HTTP 响应码时随时回来查阅。

适用场景

调试 API 响应

当 API 返回意料之外的状态码时,在这里查找其含义,了解服务器传达的信息以及如何在客户端代码中正确处理。

SEO 重定向配置

根据是否需要搜索引擎将页面权重转移到新 URL,选择 301(永久重定向)还是 302(临时重定向)。

实现错误处理逻辑

为不同的错误情况选择合适的 HTTP 状态码——400 用于请求格式错误,401 用于缺少认证,403 用于权限不足,422 用于验证失败。

阅读服务器日志

监控访问日志或错误日志时,快速解读状态码以识别异常模式,如机器人被限速(429)或内部路由出错(500)。

最佳实践

1

使用精确的状态码

返回 404 表示资源不存在、409 表示冲突、422 表示验证失败,而不是把所有错误都用 400 Bad Request 一概而论。

2

在响应体中提供详细信息

状态码标明了问题的类别,响应体则应说明具体错误原因和修复方法。

3

遵守 SEO 语义

永久迁移用 301,内容已删除用 410,维护期间用 503 并搭配 Retry-After 头部。

4

遇到 429 时使用指数退避

收到速率限制响应时,采用指数退避策略重试,而非立即重新请求,以免被直接封禁。

示例

API 成功响应

正常返回数据的 GET 请求。

Input

GET /api/users/123

Output

200 OK — 请求成功,服务器返回了用户数据。

资源不存在

请求一个不存在的页面。

Input

GET /api/users/99999

Output

404 Not Found — 服务器无法找到请求的资源。

请求被限速

短时间内发送了过多请求。

Input

GET /api/search(1 分钟内第 100 次请求)

Output

429 Too Many Requests — 需等待后使用指数退避策略重试。

局限性

  • 本工具覆盖标准 HTTP/1.1 及常见扩展状态码,不包含厂商私有代码(如 Cloudflare 的 520-527)。
  • 状态码的语义在不同实现中可能存在差异——某些 API 可能以非标准方式使用状态码。
  • 本工具是参考查询工具,无法诊断你的特定服务器为何返回某个状态码。

功能特性

  • 完整收录 50+ 种标准 HTTP 状态码
  • 支持按状态码数字、名称或描述关键词即时搜索
  • 分类筛选:信息性、成功、重定向、客户端错误、服务器错误
  • 可展开卡片显示每个状态码的真实使用场景
  • 颜色编码分类,便于快速识别
  • 突出标注与 SEO 相关的状态码及其对爬虫的影响
  • 100% 客户端运行——无数据上传,加载后可离线使用

常见问题

401 和 403 有什么区别?

401 Unauthorized 表示请求缺少有效的身份认证凭据,客户端应进行认证后重试。403 Forbidden 表示服务器理解了请求但拒绝授权,即使提供了有效凭据也无法访问。认证对 403 无效。

重定向应该用 301 还是 302?

当 URL 永久变更且希望搜索引擎将 SEO 权重转移到新地址时,使用 301 Moved Permanently。临时重定向(原始 URL 仍为规范地址)使用 302 Found。

418 I'm a Teapot 是什么意思?

这是 RFC 2324(超文本咖啡壶控制协议)中定义的状态码,最初是愚人节玩笑。部分 API 将其用作彩蛋或表示服务器故意不处理某些请求。

422 和 400 分别在什么时候使用?

400 Bad Request 用于格式错误的请求(无效 JSON 语法、缺少头部等)。422 Unprocessable Entity 用于格式正确但语义无效的请求(JSON 结构正确但字段值未通过验证)。

HTTP 状态码如何影响 SEO?

301 可向新 URL 传递约 95% 的链接权重。404 页面最终会从索引中移除。503 搭配 Retry-After 头部告诉爬虫稍后再来,不会产生惩罚。410 表示内容已被故意删除。

Last reviewed:

隐私保护

本工具为纯参考查询工具。不会向任何服务器发送数据。所有搜索和过滤操作完全在你的浏览器中完成。

使用建议与相关工作流