HTTP状态码参考

完整的HTTP状态码(1xx-5xx)参考,附详细说明。适合网页开发者和系统管理员调试HTTP响应时使用。

1xx - Informational

Request received, continuing process

100

Continue

The client should continue with its request

101

Switching Protocols

The server is switching protocols as requested by the client

102

Processing

The server is processing the request but no response is available yet

103

Early Hints

Used to return some response headers before final HTTP message

2xx - Success

The action was successfully received, understood, and accepted

200

OK

The request was successful

201

Created

The request was successful and a new resource was created

202

Accepted

The request has been accepted for processing, but processing is not complete

203

Non-Authoritative Information

The returned meta-information is not definitive

204

No Content

The request was successful but there is no content to return

205

Reset Content

The client should reset the form that caused this request to be sent

206

Partial Content

The server is delivering only part of the resource due to a range header

207

Multi-Status

The message body contains multiple status codes for different operations

208

Already Reported

The members of a DAV binding have already been enumerated

226

IM Used

The server has fulfilled a request using an instance manipulation

3xx - Redirection

Further action must be taken in order to complete the request

300

Multiple Choices

There are multiple options for the resource from which the client may choose

301

Moved Permanently

The resource has been permanently moved to a new URL

302

Found

The resource temporarily resides under a different URL

303

See Other

The response can be found under a different URL using GET method

304

Not Modified

The resource has not been modified since the last request

305

Use Proxy

The requested resource must be accessed through the proxy given by the Location field

307

Temporary Redirect

The request should be repeated with another URL but future requests should still use the original URL

308

Permanent Redirect

The request and all future requests should be repeated using another URL

4xx - Client Error

The request contains bad syntax or cannot be fulfilled

400

Bad Request

The server cannot process the request due to a client error

401

Unauthorized

Authentication is required and has failed or has not yet been provided

402

Payment Required

Reserved for future use

403

Forbidden

The request was valid, but the server is refusing action

404

Not Found

The requested resource could not be found

405

Method Not Allowed

The request method is not supported for the requested resource

406

Not Acceptable

The requested resource is capable of generating only content not acceptable according to Accept headers

407

Proxy Authentication Required

The client must first authenticate itself with the proxy

408

Request Timeout

The server timed out waiting for the request

409

Conflict

The request could not be processed because of conflict in the request

410

Gone

The resource requested is no longer available and will not be available again

411

Length Required

The request did not specify the length of its content

412

Precondition Failed

The server does not meet one of the preconditions that the requester put on the request

413

Payload Too Large

The request is larger than the server is willing or able to process

414

URI Too Long

The URI provided was too long for the server to process

415

Unsupported Media Type

The request entity has a media type which the server or resource does not support

416

Range Not Satisfiable

The client has asked for a portion of the file, but the server cannot supply that portion

417

Expectation Failed

The server cannot meet the requirements of the Expect request-header field

418

I'm a teapot

This code was defined as an April Fools' joke and is not expected to be implemented by actual HTTP servers

421

Misdirected Request

The request was directed at a server that is not able to produce a response

422

Unprocessable Entity

The request was well-formed but was unable to be followed due to semantic errors

423

Locked

The resource that is being accessed is locked

424

Failed Dependency

The request failed because it depended on another request and that request failed

425

Too Early

The server is unwilling to risk processing a request that might be replayed

426

Upgrade Required

The client should switch to a different protocol

428

Precondition Required

The origin server requires the request to be conditional

429

Too Many Requests

The user has sent too many requests in a given amount of time

431

Request Header Fields Too Large

The server is unwilling to process the request because header fields are too large

451

Unavailable For Legal Reasons

The server is denying access to the resource as a consequence of a legal demand

5xx - Server Error

The server failed to fulfill an apparently valid request

500

Internal Server Error

A generic error message when an unexpected condition was encountered

501

Not Implemented

The server either does not recognize the request method, or it lacks the ability to fulfill it

502

Bad Gateway

The server was acting as a gateway or proxy and received an invalid response from upstream

503

Service Unavailable

The server is currently unavailable (because it is overloaded or down for maintenance)

504

Gateway Timeout

The server was acting as a gateway or proxy and did not receive a timely response from upstream

505

HTTP Version Not Supported

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

506

Variant Also Negotiates

Transparent content negotiation for the request results in a circular reference

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

510

Not Extended

Further extensions to the request are required for the server to fulfill it

511

Network Authentication Required

The client needs to authenticate to gain network access

Share this tool

Help others discover HTTP Status Code Reference

关于HTTP状态码参考

工作原理

  • 按类别(1xx-5xx)浏览整理好的HTTP状态码
  • 按代码号、名称或描述搜索特定代码
  • 按状态码类别筛选以进行聚焦浏览
  • 获取每个状态码的详细说明

常见使用场景

  • 调试HTTP响应的Web开发者
  • 排查服务器问题的系统管理员
  • 学习HTTP协议的学生
  • API开发过程中的快速参考

常见问题

什么是HTTP状态码?

HTTP状态码是Web服务器返回的三位数字,用于表示客户端请求的结果。它们分为五类:1xx(信息性)、2xx(成功)、3xx(重定向)、4xx(客户端错误)和5xx(服务器错误)。

404错误是什么意思?

404未找到表示服务器无法找到请求的资源。这是最常见的客户端错误码之一,通常表示URL不正确或资源已被移动或删除。

301和302重定向有什么区别?

301永久移动表示资源已永久移动到新URL,而302找到表示临时重定向。搜索引擎对SEO目的的处理方式不同。

500内部服务器错误是什么意思?

500内部服务器错误是一种通用的服务器端错误,表示服务器出现了问题,但无法指出具体原因。通常由服务器配置错误或应用程序错误引起。

401和403错误有什么区别?

401未授权表示需要身份验证或身份验证失败。403禁止表示您已经验证身份,但没有访问该资源的权限。

1xx状态码用于什么?

1xx信息性状态码表示请求已被接收且处理正在继续。终端用户很少看到这些码,主要用于客户端和服务器之间的协议级通信。

418"我是茶壶"状态码是真实的吗?

是的,HTTP 418"我是茶壶"是RFC 2324中定义的愚人节玩笑的真实状态码。它是超文本咖啡壶控制协议的一部分,不期望由实际HTTP服务器实现。

429请求过多表示什么?

429请求过多表示用户在给定时间内发送了太多请求。这通常用于速率限制,防止Web服务和API被滥用。

如何使用此工具调试Web应用程序?

使用搜索功能快速找到您遇到的特定错误码,按类别筛选以了解不同类型的响应,参考详细描述了解每个码的含义以及如何解决问题。

是否存在100-599范围之外的状态码?

不,标准HTTP状态码是100到599之间的三位数字。超出此范围的码不是HTTP规范的一部分,不应在标准Web应用程序中使用。

遇到不熟悉的状态码该怎么办?

使用此参考工具按数字搜索该码。如果未列出,它可能是特定于您正在使用的应用程序或服务的自定义码。

为什么状态码对SEO很重要?

搜索引擎使用HTTP状态码来了解如何处理网页。正确使用301重定向、404错误和200成功响应等码有助于搜索引擎正确抓取和索引网站。

Share ToolsZone

Help others discover these free tools!

分享此页面

HTTP状态码参考 | 完整1xx-5xx指南