HTTP Status Codes
A comprehensive, developer-focused guide to every HTTP response code. Understand what they mean, why they happen, and how to debug them.
Informational (5xx)
Indicates that the initial part of a request has been received and the client should continue with the request or ignore it if already completed.
Sent in response to an `Upgrade` request header, indicating that the server is switching to the protocol requested by the client.
Indicates that the server has received and is processing the request, but no response is available yet (WebDAV).
Used to return some response headers before the final HTTP message, allowing the client to start preloading resources.
Success (5xx)
The request has succeeded. The meaning of a success varies depending on the HTTP method.
The request has succeeded and a new resource has been created as a result.
The request has been accepted for processing, but the processing has not been completed.
The server has successfully fulfilled the request and there is no additional content to send in the response body.
The server is delivering only part of the resource (byte serving) due to a range header sent by the client.
The request was successful but the returned metadata is from a transforming proxy rather than the origin server.
The server successfully processed the request, but is not returning any content; the client should reset the document view.
The server has fulfilled a GET request for the resource, and the response represents the result of one or more instance-manipulations.
Conveys information about multiple resources in situations where multiple status codes might be appropriate (WebDAV).
The members of a DAV binding have already been enumerated in a preceding part of the response and are not being included again.
Redirection (5xx)
Indicates that the resource has not been modified since the version specified by the request headers.
The requested resource has been assigned a new permanent URI.
The resource was found at a different URI, but the client should keep using the original URI for future requests.
The server is currently responding to the request with a different URI; the original URI should be used for future requests.
The target resource has been assigned a new permanent URI and any future references should use this URI.
Indicates multiple options for the resource from which the client may choose.
The response to the request can be found at another URI using a GET method.
The requested resource is available only through a proxy, the address for which is provided in the response.
Client Error (5xx)
The server cannot or will not process the request due to an error that is perceived to be a client error.
The request has not been applied because it lacks valid authentication credentials for the target resource.
Reserved for future use. Originally intended for digital payment systems but never standardized; today it is used by some APIs to signal that a paid plan, quota top-up, or billing action is required.
The server understood the request but refuses to authorize it.
The server can not find the requested resource.
The method received in the request is known by the server but not supported by the target resource.
The server cannot produce a response matching the list of acceptable values defined in the request's `Accept` headers.
The client must first authenticate itself with the proxy server.
The server timed out waiting for the request to complete.
The request could not be completed due to a conflict with the current state of the target resource.
The resource requested is no longer available and will not be available again.
The server refuses to accept the request without a defined `Content-Length` header.
The server does not meet one of the preconditions that the requester put on the request.
The request entity is larger than the limits defined by the server.
The URI requested by the client is longer than the server is willing to interpret.
The request entity has a media type which the server or resource does not support.
The range specified by the Range header field cannot be fulfilled.
Defined as an April Fools' joke in RFC 2324 (HTCPCP). Returned by teapots requested to brew coffee.
The request was well-formed but was unable to be followed due to semantic errors.
The user requested a resource that cannot legally be provided, such as content censored by a government.
The expectation indicated by the `Expect` request header cannot be met by the server.
The request was directed at a server that is not able to produce a response.
The resource that is being accessed is locked (WebDAV).
The request failed because it depended on another request that failed (WebDAV).
The server is unwilling to risk processing a request that might be replayed.
The 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.
The origin server requires the request to be conditional.
The server is unwilling to process the request because its header fields are too large.
Non-standard. Used by Laravel (and some other frameworks) to indicate CSRF token mismatch or session expiration.
Non-standard. Originally returned by Twitter's v1 API when a client was being rate limited.
Nginx-specific. The client closed the connection while the server was still processing the request.
The user has sent too many requests in a given amount of time ('rate limiting').
Server Error (5xx)
The HTTP method is not supported by the server and cannot be handled.
The HTTP version used in the request is not supported by the server.
The server is unable to store the representation needed to complete the request (WebDAV).
The server detected an infinite loop while processing the request (WebDAV).
The client needs to authenticate to gain network access.
The server has an internal configuration error: a chosen variant resource is configured to engage in transparent content negotiation itself.
Further extensions to the request are required for the server to fulfill it.
Cloudflare-specific. The origin web server has refused the connection from Cloudflare.
Cloudflare-specific. Cloudflare could not negotiate a TCP handshake with the origin server.
Cloudflare-specific. Cloudflare could not reach the origin server, often due to DNS or routing problems.
Cloudflare-specific. Cloudflare established a TCP connection to the origin server but did not receive a timely HTTP response.
Cloudflare-specific. The SSL/TLS handshake between Cloudflare and the origin server failed.
Nginx-specific. The server closed the connection without sending any response.
Cloudflare-specific. Cloudflare could not validate the SSL certificate on the origin web server.
Cloudflare-specific. An error occurred in the Railgun connection between Cloudflare and the origin server.
The server encountered an unexpected condition that prevented it from fulfilling the request.
The server, while acting as a gateway or proxy, received an invalid response from the upstream server.
The server is not ready to handle the request.
The server, while acting as a gateway or proxy, did not get a response in time from the upstream server.
Master Web Architecture
Understanding HTTP status codes is essential for debugging APIs, optimizing SEO, and building resilient web applications. Explore our detailed guides for each code to level up your engineering skills.