Blog
Http status codes

HTTP response status codes

HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:

  1. Informational responses (100 – 199)
  2. Successful responses (200 – 299)
  3. Redirection messages (300 – 399)
  4. Client error responses (400 – 499)
  5. Server error responses (500 – 599)

Information responses

Status CodeDescription
100 ContinueThis interim response indicates that the client should continue the request or ignore the response if the request is already finished.
101 Switching ProtocolsThis code is sent in response to an Upgrade request header from the client and indicates the protocol the server is switching to.
102 Processing (WebDAV)This code indicates that the server has received and is processing the request, but no response is available yet.
103 Early Hints (Experimental)This status code is primarily intended to be used with the Link header, letting the user agent start preloading resources while the server prepares a response.

Successful responses

Status CodeDescription
200 OKThe request succeeded. The meaning of "success" depends on the HTTP method used.
201 CreatedThe request succeeded, and a new resource was created as a result. This is typically the response sent after POST requests, or some PUT requests.
202 AcceptedThe request has been received but not yet acted upon. It is intended for cases where another process or server handles the request, or for batch processing.
203 Non-Authoritative InformationThis response code means the returned metadata is not exactly the same as is available from the origin server, but is collected from a local or a third-party copy.
204 No ContentThere is no content to send for this request, but the headers may be useful.
205 Reset ContentTells the user agent to reset the document which sent this request.
206 Partial ContentThis response code is used when the Range header is sent from the client to request only part of a resource.
207 Multi-Status (WebDAV)Conveys information about multiple resources, for situations where multiple status codes might be appropriate.
208 Already Reported (WebDAV)Used inside a <dav:propstat> response element to avoid repeatedly enumerating the internal members of multiple bindings to the same collection.
226 IM Used (HTTP Delta encoding)The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.

Redirection messages

Status CodeDescription
300 Multiple ChoicesThe request has more than one possible response.
301 Moved PermanentlyThe URL of the requested resource has been changed permanently.
302 FoundThe URI of requested resource has been changed temporarily.
303 See OtherThe client should get the requested resource at another URI with a GET request.
304 Not ModifiedThe response has not been modified, so the client can continue to use the same cached version of the response.
305 Use Proxy (Deprecated)The requested response must be accessed by a proxy.
306 unusedThis response code is no longer used; it is just reserved.
307 Temporary RedirectThe client should get the requested resource at another URI with the same method that was used in the prior request.
308 Permanent RedirectThe resource is now permanently located at another URI.

Client error responses

Status CodeDescription
400 Bad RequestThe server cannot or will not process the request due to something that is perceived to be a client error.
401 UnauthorizedThe client must authenticate itself to get the requested response.
402 Payment Required (Experimental)This response code is reserved for future use.
403 ForbiddenThe client does not have access rights to the content. The client's identity is known to the server.
404 Not FoundThe server cannot find the requested resource.
405 Method Not AllowedThe request method is not supported by the target resource.
406 Not AcceptableThe server doesn't find any content that conforms to the criteria given by the user agent.
407 Proxy Authentication RequiredAuthentication is needed to be done by a proxy.
408 Request TimeoutThe server would like to shut down this unused connection.
409 ConflictA request conflicts with the current state of the server.
410 GoneThe requested content has been permanently deleted from server, with no forwarding address.
411 Length RequiredThe server requires the Content-Length header field.
412 Precondition FailedThe server does not meet the client's preconditions.
413 Payload Too LargeRequest entity is larger than limits defined by server.
414 URI Too LongThe URI requested by the client is longer than the server is willing to interpret.
415 Unsupported Media TypeThe media format of the requested data is not supported by the server.
416 Range Not SatisfiableThe range specified by the Range header field in the request cannot be fulfilled.
417 Expectation FailedThe expectation indicated by the Expect request header field cannot be met by the server.
418 I'm a teapotThe server refuses the attempt to brew coffee with a teapot.
421 Misdirected RequestThe request was directed at a server that is not able to produce a response.
422 Unprocessable Content (WebDAV)The request was well-formed but was unable to be followed due to semantic errors.
423 Locked (WebDAV)The resource that is being accessed is locked.
424 Failed Dependency (WebDAV)The request failed due to failure of a previous request.
425 Too Early (Experimental)The server is unwilling to risk processing a request that might be replayed.
426 Upgrade RequiredThe server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.
428 Precondition RequiredThe origin server requires the request to be conditional.
429 Too Many RequestsThe user has sent too many requests in a given amount of time.
431 Request Header Fields Too LargeThe server is unwilling to process the request because its header fields are too large.
451 Unavailable For Legal ReasonsThe user agent requested a resource that cannot legally be provided.

Server error responses

Status CodeDescription
500 Internal Server ErrorThe server has encountered a situation it does not know how to handle.
501 Not ImplementedThe request method is not supported by the server and cannot be handled.
502 Bad GatewayThe server, while working as a gateway to get a response needed to handle the request, got an invalid response.
503 Service UnavailableThe server is not ready to handle the request. A user-friendly page explaining the problem should be sent. This response should be used for temporary conditions.
504 Gateway TimeoutThe server is acting as a gateway and cannot get a response in time.
505 HTTP Version Not SupportedThe HTTP version used in the request is not supported by the server.
506 Variant Also NegotiatesThe server has an internal configuration error.
507 Insufficient Storage (WebDAV)The server is unable to store the representation needed to successfully complete the request.
508 Loop Detected (WebDAV)The server detected an infinite loop while processing the request.
510 Not ExtendedFurther extensions to the request are required for the server to fulfill it.
511 Network Authentication RequiredIndicates that the client needs to authenticate to gain network access.