HTTP状态代码表

HTTP状态代码表

The List of HTTP Status Codes

1xx(临时响应)

表示临时响应并需要请求者继续执行操作的状态代码。

100 – Continue

ndicates that part of a request has been successfully received, and the rest should now be sent.

(继续)说明部分请求已成功收到,其余的现在应该发出。

101 – Switching Protocols

Status code 101 is when the server is changing protocols as defined in the “Upgrade” header that it returns to the browser.

(切换协议) 请求者已要求服务器切换协议,服务器已确认并准备切换。 

uccessful

2xx (成功)

表示成功处理了请求的状态代码。

200 – OK

This just means that the request has been received and understood and is being processed.

(成功)  服务器已成功处理了请求。 通常,这表示服务器提供了请求的网页。 如果针对您的 robots.txt 文件显示此状态代码,则表示 Googlebot 已成功检索到该文件。

201 – Created

This indicates that a request was successful and as a result, a resource has been created.

(已创建)  请求成功并且服务器创建了新的资源。 

202 – Accepted

Status code 202 indicates that the server has received and understood the request and has been accepted for processing.

(已接受)  服务器已接受请求,但尚未处理。 

203 – Non-Authoritative Information

This is a lot like a status 200 except the response comes from a third party rather than the original server.

(非授权信息)  服务器已成功处理了请求,但返回的信息可能来自另一来源。

204 – No Content

The request has been received and understood but there is nothing to send back.

(无内容)  服务器成功处理了请求,但没有返回任何内容。

205 – Reset Content

An example of this might be if a user fills out a form, and submits it, a status code of 205 means the server is asking the browser to clear the form.

(重置内容) 服务器成功处理了请求,但没有返回任何内容。 与 204 响应不同,此响应要求请求者重置文档视图(例如,清除表单内容以输入新内容)。 

206 – Partial Content

A status code of 206 is a response to a request for part of a document.

服务器成功处理了部分 GET 请求。 

edirection

3xx (重定向)

要完成请求,需要进一步操作。 通常,这些状态代码用来重定向。 Google 建议您在每次请求中使用重定向不要超过 5 次。 您可以使用网站管理员工 具查看一下 Googlebot 在抓取重定向网页时是否遇到问题。 诊断下的网络抓取页中列出了由于重定向错误而导致 Googlebot 无法抓取的 网址。

300 – Multiple Choices

The 300 status code indicates that a resource has moved. The response will include a list of locations that the user agent can select from.

(多种选择)  针对请求,服务器可执行多种操作。 服务器可根据请求者 (user agent) 选择一项操作,或提供操作列表供请求者选择。

301 – Moved Permanently

A status code of 301 tells a client that the resource they asked for has permanently moved to a new location. It tells the client that it should use the new URL for this resource.

(永久移动)  请求的网页已永久移动到新位置。 服务器返回此响应(对 GET 或 HEAD 请求的响应)时,会自动将请求者转到新位置。 您应使用此代码告诉 Googlebot 某个网页或网站已永久移动到新位置。

302 – Found

This is when a resource has been temporarily moved to a new location. It tells the client that it should still use the same URL to access the resource.

(临时移动) 服务器目前从不同位置的网页响应请求,但请求者应继续使用原有位置来进行以后的请求。 此代码与响应 GET 或 HEAD 请求 的 301 代码类似,会自动将请求者转到不同的位置,但您不应使用此代码来告诉 Googlebot 某个网页或网站已经移动,因 为 Googlebot 会继续抓取原有位置并编制索引。

303 – See Other

This means that the response to the request is found at a different URL. It doesn’t mean the resource has moved, it is just giving the address to where the response can be found.

(查看其他位置) 请求者应当对不同的位置使用单独的 GET 请求来检索响应时,服务器返回此代码。 对于除 HEAD 之外的所有请求,服务器会自动转到其他位置。 

304 – Not Modified

304 status indicates whether a document is different from the one in the client’s cache.

(未修改) 自从上次请求后,请求的网页未修改过。 服务器返回此响应时,不会返回网页内容。 如果网页自请求者上次请求后再也没有更改过,您应当将服务器配置为返回此响应(称为 If-Modified-Since HTTP 标头)。 由于服务器可以告诉 Googlebot 自从上次抓取后网页没有变更,因此可节省带宽和开销。

305 – Use Proxy

A 305 status code tells the client that the requested resource has to be reached through a proxy, which will be specified in the response.

(使用代理) 请求者只能使用代理访问请求的网页。 如果服务器返回此响应,还表示请求者应使用代理。 

307 – Temporary Redirect

307 is pretty well the same as status 302.

(临时重定向)  服务器目前从不同位置的网页响应请求,但请求者应继续使用原有位置来进行以后的请求。 此代码与响应 GET 和 HEAD 请求 的 301 代码类似,会自动将请求者转到不同的位置,但您不应使用此代码来告诉 Googlebot 某个页面或网站已经移动,因 为 Googlebot 会继续抓取原有位置并编制索引。 

lient Error

4xx(请求错误)
这些状态代码表示请求可能出错,妨碍了服务器的处理。

400 – Bad Request

A status code of 400 indicates that the server did not understand the request due to bad syntax.

(错误请求) 服务器不理解请求的语法。 

401 – Unauthorized

A 401 status code indicates that the client must be authorized before receiving the resource.

(未授权) 请求要求身份验证。 对于需要登录的网页,服务器可能返回此响应。

402 – Payment Required

The 402 status code is not in use. It’s listed as “reserved for future use”.

未被使用的代码,被标识为“保留,以备经来使用”

403 – Forbidden

A 403 status code indicates that the client cannot access the requested resource. This could mean that authentication failed, or the user does not have permission.

(禁止) 服务器拒绝请求。 如果您在 Googlebot 尝试抓取您网站上的有效网页时看到此状态代码(可以在 Google 网站管理员工具诊断下的网络抓取页面上看到此信息),可能是您的服务器或主机拒绝 Googlebot 访问。

404 – Not Found

This is probably the most popular. It just means that the page you were looking for cannot be found.

(未找到) 服务器找不到请求的网页。 例如,对于服务器上不存在的网页经常会返回此代码。 如 果您的网站上没有 robots.txt 文件,而您在 Google 网站管理员工具"诊断"标签的 robots.txt 页上看到此状态,那么这是 正确的状态。 但是,如果您有 robots.txt 文件而又看到此状态,则说明您的 robots.txt 文件可能命名错误或位于错误的位置 (该 文件应当位于顶级域名,名为 robots.txt)。如果对于 Googlebot 尝试抓取的网址看到此状态(在"诊断"标签的 HTTP 错误页上),则表示 Googlebot 追踪的可能是另一个页面的无效链接(是旧链接或输入有误的链接)。

405 – Method Not Allowed

A 405 status code is returned when the client is trying to use a request method (POST, GET) that the server doesn’t allow.

(方法禁用) 禁用请求中指定的方法。 

406 – Not Acceptable

The 406 status code means that the server understood and processed the request, but the response is not in the form that the client specified in the header request.

(不接受) 无法使用请求的内容特性响应请求的网页。

407 – Proxy Authentication Required

The client must be authorized by the proxy before the request can proceed.

(需要代理授权) 此状态代码与 401(未授权)类似,但指定请求者应当授权使用代理。 如果服务器返回此响应,还会指明请求者应当使用的代理。  

408 – Request Timeout

The client didn’t produce a request quick enough. Servers have a set time limit, a 408 indicates that it went past the limit.

(请求超时)  服务器等候请求时发生超时。 

409 – Conflict

A 409 status code indicates that the server was unable to complete the request. This might happen if your trying to add, edit, remove a file, and you are unable to.

(冲突)  服务器在完成请求时发生冲突。 服务器必须在响应中包含有关冲突的信息。 服务器在响应与前一个请求相冲突的 PUT 请求时可能会返回此代码,同时会附上两个请求的差异列表。 

410 – Gone

A 410 status code is similar to 404, but indicates that the file is permanently gone. Where 404 doesn’t indicate one way or another.

(已删除)  如果请求的资源已永久删除,服务器就会返回此响应。 该代码与 404(未找到)代码相似,但在资源以前存在而现在不存在的情况下,有时会用来替代 404 代码。 如果资源已永久删除,您应当使用 301 指定资源的新位置。 

411 – Length Required

The 411 status code occurs when a server refuses to process a request because a content length was not specified.

(需要有效长度) 服务器不接受不含有效内容长度标头字段的请求。 

412 – Precondition Failed

A 412 status code indicates that one of the preconditions of the request was not met.

(未满足前提条件) 服务器未满足请求者在请求中设置的其中一个前提条件。

413 – Request Entity Too Large

The 413 status code indicates that the request was too large. Either by physical limit of the server or a setting on the server.

(请求实体过大) 服务器无法处理请求,因为请求实体过大,超出服务器的处理能力。

414 – Request-URI Too Long

The 414 status code simply means that the URL was too long to be processed.

(请求的 URI 过长) 请求的 URI(通常为网址)过长,服务器无法处理。 

415 – Unsupported Media Type

A 415 status code is returned by a server to indicate that part of the request was in an unsupported format.

(不支持的媒体类型) 请求的格式不受请求页面的支持。 

416 – Requested Range Not Satisfiable

A 416 status code indicates that the server was unable to fulfill the request. For example, the client requests bytes outside the total bytes of a document.

(请求范围不符合要求) 如果页面无法提供请求的范围,则服务器会返回此状态代码。 

417 – Expectation Failed

The 417 status code means that one of the headers sent to the server, indicated an expectation the server could not meet.

(未满足期望值) 服务器未满足"期望"请求标头字段的要求。 

erver Error

5xx(服务器错误)
这些状态代码表示服务器在尝试处理请求时发生内部错误。 这些错误可能是服务器本身的错误,而不是请求出错

500 – Internal Server Error

A 500 status code means the server came across something unexpected and could not complete the request.

(服务器内部错误)  服务器遇到错误,无法完成请求。

501 – Not Implemented

The server does not support all that is needed for the request to be completed.

(尚未实施) 服务器不具备完成请求的功能。 例如,服务器无法识别请求方法时可能会返回此代码。 

502 – Bad Gateway

If the server is acting as a proxy, received a response from a server further up that judged the request as invalid.

(错误网关) 服务器作为网关或代理,从上游服务器收到无效响应。 

503 – Service Unavailable

When a server can’t complete a request because it is too busy (overloaded)

(服务不可用) 服务器目前无法使用(由于超载或停机维护)。 通常,这只是暂时状态。 

504 – Gateway Timeout

When a server is acting as a proxy, and a server upstream is taking too long.

(网关超时)  服务器作为网关或代理,但是没有及时从上游服务器收到请求。 

505 – HTTP Version Not Supported

A 505 status code is returned when the HTTP version indicated in the request is no supported. The response should indicate which HTTP versions are supported.

(HTTP 版本不受支持) 服务器不支持请求中所用的 HTTP 协议版本。

你可能感兴趣的:(http)