HTTP Status Codes - HTTP Status Code Lookup

Related Tools:
IP Query
HTTP Headers Viewer
Documentation:
HTTP Headers Reference
Category Description
1xx

1xx status codes represent that the request has been received and needs to continue processing. Such responses are temporary responses that include only the status line and certain optional response header information and end with a blank line.

HTTP/1.0 protocol specification does not define any 1xx status codes, so unless under certain experimental conditions, servers are prohibited from sending 1xx responses to such clients. These status codes represent informational responses, indicating other actions the client should take.

2xx

2xx status codes represent that the request has been successfully received, understood, and accepted by the server.

3xx

3xx status codes represent that the client needs to take further actions to complete the request. Usually, these status codes are used for redirection, with the subsequent request address (redirect target) specified in the Location field of this response.

Only when the subsequent request uses the GET or HEAD method can the user browser automatically submit the required subsequent request without user intervention. According to HTTP/1.0 protocol specification recommendations, browsers should not automatically access more than 5 redirects.

4xx

4xx status codes represent that the client appears to have made an error, preventing the server from processing.

5xx

5xx status codes represent that the server encountered an error or abnormal state while processing the request, or the server realizes that with the current hardware and software resources, it cannot complete the processing of the request.

Common HTTP Status Codes

Status Code Description
100 Continue The server has received the request headers and the client should continue to send the request body (in the case of a request for which a body needs to be sent: for example, a POST request), or ignore this response if the request has already been completed. The server must send a final response to the client after the request has been completed.
101 Switching Protocols The server has understood the client's request, and will notify the client via the Upgrade message header to adopt a different protocol to complete this request. After sending the last blank line of this response, the server will switch to those protocols defined in the Upgrade message header.
200 OK Request successful The response headers or data body expected by the request will be returned with this response
201 Created The request has been fulfilled and a new resource has been created according to the request's need, and its URI has been returned with the Location header information. If the required resource cannot be created in time, '202 Accepted' should be returned.
202 Accepted The server has accepted the request, but has not yet processed it. Just as it might be rejected, this request may or may not eventually be executed. There is no more convenient approach than sending this status code in the case of asynchronous operations.
204 No Content The server successfully processed the request, but does not need to return any entity content, and hopes to return updated meta information. The response may return new or updated meta information in the form of entity headers.
206 Partial Content The server has successfully processed part of the GET request

Similar to HTTP download tools like FlashGet or Thunder, all use this type of response to implement resumable downloads or split a large document into multiple download segments for simultaneous download.

This request must include Range header information to indicate the content range that the client wants to get, and may include If-Range as a request condition.

The response must include the following header fields:

  • Content-Range is used to indicate the content range returned in this response; if it is a multi-segment download with Content-Type as multipart/byteranges, then each multipart segment should contain a Content-Range field to indicate the content range of this segment. If the response contains Content-Length, then its value must match the actual number of bytes in the content range it returns.
  • Date
  • ETag and/or Content-Location, if the same request should have returned a 200 response.
  • Expires, Cache-Control, and/or Vary, if their values might be different from the values corresponding to other responses of the same variable previously.

If this response request uses If-Range strong cache validation, then this response should not contain other entity headers; if this response request uses If-Range weak cache validation, then this response is prohibited from containing other entity headers; this avoids inconsistency between cached entity content and updated entity header information. Otherwise, this response should contain all entity header fields that should be returned in a 200 response.

If the ETag or Last-Modified headers cannot be exactly matched, then the client cache should prohibit combining the content returned by the 206 response with any previously cached content.

Any cache that does not support Range and Content-Range headers is prohibited from caching the content returned by a 206 response.

301 Moved Permanently

The requested resource has been permanently moved to a new location, and any future references to this resource should use one of the several URIs returned by this response. If possible, clients with link editing functionality should automatically modify the request address to the address fed back from the server. Unless otherwise specified, this response is also cacheable.

The new permanent URI should be returned in the response's Location field. Unless this is a HEAD request, the response entity should contain a hyperlink to the new URI and a brief description.

If this is not a GET or HEAD request, browsers are therefore prohibited from automatically redirecting unless user confirmation is obtained, because the request conditions may change as a result.

Note: For some browsers using the HTTP/1.0 protocol, when they send a POST request and get a 301 response, the subsequent redirect request will become a GET method.

302 Found

The requested resource now temporarily responds to requests from a different URI. Since such redirects are temporary, clients should continue to send future requests to the original address. This response is cacheable only if specified in Cache-Control or Expires.

The new temporary URI should be returned in the response's Location field. Unless this is a HEAD request, the response entity should contain a hyperlink to the new URI and a brief description.

If this is not a GET or HEAD request, then browsers are prohibited from automatically redirecting unless user confirmation is obtained, because the request conditions may change as a result.

303 See Other The response to the current request can be found at another URI, and the client should access that resource using the GET method.

The existence of this method is mainly to allow POST request output activated by scripts to redirect to a new resource. This new URI is not a substitute reference for the original resource.

307 Temporary Redirect The requested resource now temporarily responds to requests from a different URI.

Similar to 302, but the 307 status code does not allow browsers to redirect an originally POST request to a GET request.

308 Permanent Redirect The requested resource has been permanently moved to a new location.

Similar to 301, but the 308 status code does not allow browsers to redirect an originally POST request to a GET request.

304 Not Modified If the client sent a conditional GET request and the request has been allowed, but the document content (since the last access or according to the request conditions) has not changed, then the server should return this status code.

304 responses are prohibited from containing a message body, so they always end with the first blank line after the message header.

The response must contain one of the following header information: Date, ETag, Server, Vary unless this header information has already been set in the cache.

400 Bad Request Due to obvious client errors (such as malformed request syntax, too large size, invalid request message or deceptive routing requests), the server cannot or will not process the request.

The client should not resubmit this request without modification.

401 Unauthorized See RFC 7235. Similar to 403 Forbidden, 401 semantically means "unauthenticated", i.e., the user does not have the necessary credentials.

This status code indicates that the current request requires user authentication. The response must contain a WWW-Authenticate information header applicable to the requested resource to query user information.

The client can resubmit a request containing appropriate Authorization header information. If the current request already contains Authorization credentials, then a 401 response represents that the server authentication has rejected those credentials.

403 Forbidden The server has understood the request but refuses to execute it.

Unlike the 401 response, authentication cannot provide any help, and this request should not be resubmitted. If this is not a HEAD request, and the server wishes to be able to explain why the request cannot be executed, then the reason for the rejection should be described in the entity.

Of course, the server can also return a 404 response if it does not want the client to get any information.

404 Not Found Request failed, the resource that the request hoped to obtain was not found on the server.

No information can tell the user whether this situation is temporary or permanent. If the server knows the situation, it should use the 410 status code to inform that the old resource is permanently unavailable due to some internal configuration mechanism problems, and there is no address to jump to.

The 404 status code is widely used when the server does not want to reveal exactly why the request was rejected or no other suitable response is available.

405 Method Not Allowed The request method specified in the request line cannot be used for the corresponding resource.

The response must return an Allow header information to indicate the list of request methods that the current resource can accept.

Since PUT and DELETE methods will perform write operations on resources on the server, most web servers do not support or do not allow the above request methods in the default configuration, and will return 405 errors for such requests.

408 Request Timeout Request timeout.

The client did not complete sending a request within the time the server was prepared to wait. The client can resubmit this request at any time without any changes.

409 Conflict The request cannot be completed due to a conflict with the current state of the requested resource.

This code is only allowed to be used in such situations: users are considered to be able to resolve the conflict and will resubmit new requests.

410 Gone The requested resource is no longer available on the server, and there is no known forwarding address.

Such a situation should be considered permanent. If possible, clients with link editing functionality should delete all references pointing to this address.

413 Payload Too Large The server refuses to process the current request because the entity data size submitted by the request exceeds the range that the server is willing or able to process.

In this case, the server can close the connection to prevent the client from continuing to send this request.

429 Too Many Requests The user has sent too many requests in a given amount of time.

The response may contain a Retry-After header, suggesting how long the user should wait before trying again.

500 Internal Server Error The server encountered a situation it doesn't know how to handle.

The server encountered an unexpected situation that caused it to be unable to complete processing the request. Generally speaking, this problem occurs when there is an error in the server's program code.

501 Not Implemented The server does not support a certain function required by the current request.

When the server cannot recognize the request method and cannot support its request for any resource, this status code is appropriate.

502 Bad Gateway The server working as a gateway or proxy received an invalid response from the upstream server when trying to execute the request.

502 errors usually cannot be fixed by the client, but need to be fixed by the intervening web server or proxy server.

503 Service Unavailable The server is currently unavailable (due to overload or downtime for maintenance).

Usually, this is just a temporary state. If the delay time can be predicted, then the response can include a Retry-After header to indicate this delay time. If this Retry-After information is not given, then the client should handle it in the same way as handling a 500 response.

504 Gateway Timeout The server working as a gateway or proxy did not receive a response in time from the upstream server (servers identified by URI, such as HTTP, FTP, LDAP) or auxiliary servers (such as DNS) when trying to execute the request.

Note: Some proxy servers return 400 or 500 errors when DNS queries time out.