The complete HTTP Status response codes reference
An HTTP status code is a three-digit integer code given by web servers on the Internet in a response to a request for a resource such as a web page or a file.
The status codes indicate whether a specific HTTP request has been successfully completed. If a resource does not load properly, status codes help to identify the specific cause of the problem.
Responses are grouped into five classes. The first digit of the status code defines the class of response while the last two digits do not have any categorization role.
These classes are as follows:
- 1). Informational (1xx)
- 2). Successful (2xx)
- 3). Redirection (3xx)
- 4). Client Error (4xx)
- 5). Server Error (5xx)
1. Informational Responses
This class of HTTP status codes indicates that the request was received it is currently in progress.
This response code indicates that everything so far is OK and that the client should continue with the request or ignore it if it is already finished.
101 Switching Protocols
This code is sent in response to a request by the client to switch protocol indicating that the server is willing to comply and is switching to the protocol.
This code indicates that 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 so that the client can start preloading resources while the server is still preparing a response.
2. Successful Responses
This class of status codes indicates the action requested by the client was received, understood, and accepted.
This is the standard response code for successful HTTP requests.
The request is complete, and a new resource is created.
The request has been accepted for processing, but the processing has not been completed. The request might or might not be eventually acted upon, and may be disallowed when processing occurs.
203 Non-authoritative Information
The information in the entity-header is from a local or third-party copy, not from the original server. Except for this condition, a 200 OK response should be preferred instead of this response.
204 No Content
The server successfully processed the request and is not returning any content.
205 Reset Content
This response code is sent after accomplishing the request to tell the browser to clear the form which sent this request.
206 Partial Content
The server is returning partial data of the size requested. Used in response to a request specifying a Range header. The server must specify the range included in the response with the Content-Range header.
A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate.
Used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly.
226 IM Used
The server has fulfilled a request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
3. Redirection Messages
This class of status code indicates the client must take additional action to complete the request. The action required MAY be carried out by the user agent without interaction with the user if and only if the method used in the second request is GET or HEAD. A client SHOULD detect infinite redirection loops since such loops generate network traffic for each redirection.
300 Multiple Choices
The request has more than one possible response. The user-agent or user should choose one of them. There is no standardized way of choosing one of the responses.
301 Moved Permanently
This response code means that the URL of the requested resource has been changed permanently. Probably, the new URI would be given in the response.
The URL to the requested resource has been temporarily changed. New changes in the URL might be made in the future and therefore, the same URL should be used by the client in future requests.
303 See Other
The status code means the response to the request can be found at another URL using the GET method. If the request was sent through another method eg POST, the client should presume that the server has received the data and should issue a new GET request to the given URL.
304 Not Modified
This is used for caching purposes. It tells the client that the response has not been modified and so the client can continue to use the same cached version of the response.
305 Use Proxy
This indicates that the requested resource can only be accessed through a proxy. It has been deprecated due to security concerns regarding the in-band configuration of a proxy.
This code was used in a previous HTTP version. It is no longer used, but the code is reserved.
307 Temporary Redirect
The requested resource has moved temporarily to a new URL. The client is directed to get the resource through another URL with the same method that was used in the prior request. It semantically works like 302 apart from that the client must not change the HTTP method used.
308 Permanent Redirect
The resource is now permanently located at another URI, specified by the response header. It has the same semantics as the 301 response code apart from that the client must not change the HTTP method used in the prior request.
4. Client Error Responses
This class of status codes is intended for situations in which the error seems to have been caused by the client.
400 Bad Request
This response means that server could not understand the request due to invalid syntax. The client should not repeat the request without modifications.
The request requires user authentication in order for the client to get the requested response.
402 Payment Required
This status code is currently not in use but reserved for future use.
This code means the client does not have the necessary permission to access the requested resource, so the server is rejecting to give a proper response. Unlike 401, the client's identity is known to the server.
404 Not Found
This response code is probably the most famous one due to its frequent occurrence on the web. It means that the requested resource could not be found on the server.
405 Method Not Allowed
A request method is not supported for the requested resource; eg, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource.
406 Not Acceptable
The requested resource is capable of generating only content that is not acceptable according to the Accept headers sent in the request.
407 Proxy Authentication Required
This is similar to 401 but authentication is needed to be done by a proxy.
408 Request Timeout
The request took longer than the server was prepared to wait for it.
This response code indicates the request could not be completed due to a conflict with the current state of the resource, such as an edit conflict between multiple simultaneous updates.
The response indicates that the requested resource is no longer available and will not be available again. This should be used when a resource has been intentionally removed and the resource should be purged. Upon receiving a 410 status code, the client should not request the resource in the future.
411 Length Required
The request did not specify the content length, which is required by the requested resource.
412 Precondition Failed
The server does not meet one or more of the preconditions that were sent in the request header.
413 Request Entity Too Large
The server will not process a request because the request entity is larger than the server is willing or able to process. The server might close the connection and prevent the client from continuing the request or if the condition is temporary return a Retry-After header field.
414 Request URI too Long
The URL requested by the client is longer than the server is willing to interpret.
415 Unsupported Media Type
The server will not accept the request, because the request entity has a media type that the server or resource does not support.
416 Requested Range Not Satisfiable
The range specified by the Range header field in the request can't be fulfilled; it's possible that the range is outside the size of the target URL's data.
417 Expectation Failed
The expectation given in an Expect request-header field could not be met by this server.
418 I'm a teapot
The server refuses the attempt to brew coffee with a teapot.
421 Misdirected Request
The request was directed at a server that is not able to produce a response. This can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URL.
422 Unprocessable Entity
The request was well-formed but was unable to be followed due to semantic errors.
The resource that is being accessed is locked.
424 Failed Dependency
The request failed due to the failure of a previous request.
425 Too Early
This indicates that the server is unwilling to risk processing a request that might be replayed.
426 Upgrade Required
The server refuses to perform the request using the current HTTP protocol but might be willing to do so after the client upgrades to a different protocol. The server sends an Upgrade header in a 426 response to indicate the required protocol(s).
428 Precondition Required
The origin server requires the request to be conditional. Intended to prevent the ’lost update’ problem, where a client GETs a resource's state, modifies it, and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict.
429 Too Many Requests
The user has sent too many requests in a given amount of time ("rate limiting").
431 Request Header Fields Too Large
The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields.
451 Unavailable For Legal Reasons
It indicates that a server has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource.
5. Server Error Responses
Response status codes beginning with the digit "5" indicate cases in which the server is aware that it has encountered an error or is otherwise incapable of performing the request. Except when responding to a HEAD request, the server should include an entity containing an explanation of the error situation, and whether it is a temporary or permanent condition. User agents should display any included entity to the user. These response codes are applicable to any request method.
500 Internal Server Error
The server has encountered a situation it doesn't know how to handle.
501 Not Implemented
The request method is not supported by the server and cannot be handled.
502 Bad Gateway
This error response means that the server while working as a gateway to get a response needed to handle the request, got an invalid response.
503 Service Unavailable
The server cannot handle the request (because it is overloaded or down for maintenance). Generally, this is a temporary state.
504 Gateway Timeout
The server was acting as a gateway or proxy and 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.
506 Variant Also Negotiates
The server has an internal configuration error: 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
This status code indicates that the client needs to authenticate to gain network access.