The Complete HTTP Status Codes Reference Guide for 2023
This article is a complete guide on HTTP response codes, accompanied by a cheat sheet for quick reference. It explains the meaning of each range, which typically falls between 100-400, and covers the most important codes to remember.
What are http status codes?
Website servers send HTTP status codes to indicate the success or failure of a request sent by a user or developer.
What is the range of these http response codes?
HTTP response codes typically range from 100 to 400, and each range signifies a different message. Let's explore the various ranges and their respective meanings.
- 1xx : Informational
- 2xx : Success
- 3xx : Direction
- 4xx : Client Error
- 5xx : Server Error
Let's take a closer look at each range and the critical status codes that are worth knowing.
1xx : Informational
100 Continue: The server has received the initial part of the request and is ready for the client to proceed with sending the remainder of the request.
101 Switching Protocols: The server is changing the protocol used in the connection, as requested by the client. The server will include an Upgrade header indicating the new protocol being used.
102 Processing: The server has received the request and is currently processing it, but a response is not yet available.
103 Early Hints: The server is sending a preliminary response to the client while it continues to gather the complete response. This response may include headers that give the client an idea of what the final response will be.
2xx : Success
200 OK: The request has been successfully processed by the server. The content of the response depends on the type of request made by the client.
201 Created: The server has fulfilled the request and created a new resource. The response includes one or more URIs that can be used to reference the newly created resource.
202 Accepted: The server has accepted the request for processing, but the processing is not yet complete. The request may or may not be acted upon in the future.
203 Non-Authoritative Information: The server is acting as a proxy and returning a modified version of a response it received from another server.
204 No Content: The server has successfully processed the request, but there is no content to send back in the response body.
205 Reset Content: The server has successfully processed the request, and the user agent (e.g. browser) should reset the view of the document that caused the request to be sent.
206 Partial Content: The server is responding with only a portion of the requested resource, as specified by the client's range header
3xx : Direction
- 300 Multiple Choices: When a client requests a resource that has multiple representations, each with its own URI, the server cannot determine which one to provide. In response, the server sends a list of options for the client to choose from.
- 301 Moved Permanently: The requested resource has permanently moved to a new URI. The response includes the new URI, and subsequent requests should use it instead of the original URI.
- 302 Found: The requested resource has temporarily moved to a different URI. The response includes the new URI, and subsequent requests should use it instead of the original URI.
- 303 See Other: The response to the request can be found at a different URI. The server provides the new URI in the response, and the client should issue a new request to that URI.
- 304 Not Modified: The requested resource has not been modified since the last request. The server returns a "not modified" response, which allows the client to use a cached copy of the resource.
- 305 Use Proxy: The requested resource must be accessed through a proxy specified in the response. The server includes a Proxy-Authenticate header with the response, which provides the necessary information for the client to access the resource.
- 306 Switch Proxy: This status code is no longer used, but it was once used as a way to indicate that subsequent requests should use a different proxy.
- 307 Temporary Redirect: The requested resource has temporarily moved to a different URI. The response includes the new URI, and subsequent requests should use it instead of the original URI.
- 308 Permanent Redirect: The requested resource has permanently moved to a different URI. The response includes the new URI, and subsequent requests should use it instead of the original URI.
4xx : Client Error
400 Bad Request: The server cannot or will not process the request due to an apparent client error, such as malformed syntax or invalid request message framing.
401 Unauthorized: When a client tries to access a resource, but they have not been authenticated, the server responds with this status code. The client must authenticate themselves to receive the requested response. This status code is similar to 403 (Forbidden), but in this case, authentication is possible.
402 Payment Required: It was originally created to indicate that a payment is required before accessing the requested resource. This status code is reserved for future use
403 Forbidden: When a client attempts to access content without proper access rights, the server responds with this status code. The server rejects the request and refuses to provide a proper response.
404 Not Found: This status code indicates that the server cannot find the requested resource. It is commonly used to indicate that a requested page or resource does not exist on the server.
405 Method Not Allowed: This status code is typically returned when the client uses an unsupported HTTP method for the requested resource. The server does not support the request method (GET, POST, PUT, DELETE, etc.) for the requested resource.
406 Not Acceptable: This status code indicates that the server cannot produce a response that matches the list of acceptable values defined in the request's proactive content negotiation headers.
407 Proxy Authentication Required: If a client wants to access a resource through a proxy, this status code indicates that the client must first authenticate themselves with the proxy server. This status code is similar to 401 (Unauthorized), but it specifically requires the client to authenticate itself with a proxy server.
408 Request Timeout: If the server does not receive a request from the client within a specific time frame, it responds with this status code.
409 Conflict: This HTTP status code indicates that there is a conflict with the current state of the target resource, which prevents the requested action from being completed.
410 Gone: When a requested resource is no longer available, and there is no forwarding address, the server responds with this status code. It is similar to a 404 (Not Found) status code, but it is more definitive.
411 Length Required: The server requires a valid Content-Length header field in the request, and it will not process the request without it
412 Precondition Failed: The server cannot fulfill the request because it does not meet one or more of the preconditions set by the client.
413 Payload Too Large: The request exceeds the maximum size limit that the server is willing or able to process.
414 URI Too Long: The URI provided in the request is too long for the server to handle, and it cannot be processed.
415 Unsupported Media Type: The client has specified a media type in the request that the server does not support or cannot process.
416 Range Not Satisfiable: The server is unable to fulfill the requested ranges of the resource, and the client needs to modify its request.
417 Expectation Failed: The server could not fulfill the expectation specified in the Expect request header field.
418 I'm a teapot: This status code is a humorous and not intended to be implemented by real-world HTTP servers.
421 Misdirected Request: This status code indicates that the server cannot produce a response because the client has sent a request that was either not formed correctly or cannot be fulfilled by the server.
422 Unprocessable Entity: The request was well-formed, but the server was unable to process it due to semantic errors.
423 Locked: The resource being accessed is locked and cannot be accessed.
424 Failed Dependency: The requested action failed because it depended on another request that also failed.
426 Upgrade Required: The client is required to switch to a different protocol, such as TLS/1.0, as specified in the Upgrade header field.
428 Precondition Required: The server requires the request to meet certain conditions before it can be processed.
429 Too Many Requests: This status code indicates that the user has exceeded the limit of requests allowed within a given time frame.
431 Request Header Fields Too Large: The server is unable to process the request because the size of its header fields exceeds the maximum limit.
451 Unavailable For Legal Reasons: The server is denying access to the resource due to a legal demand.
5xx : Server Error
500 Internal Server Error: An unexpected condition was encountered on the server that prevented it from fulfilling the request.
501 Not Implemented: The server cannot fulfill the request due to a lack of necessary functionality.
502 Bad Gateway: An invalid response was received from the upstream server by the gateway or proxy acting as an intermediary.
503 Service Unavailable: The server is temporarily unable to handle the request due to overload or maintenance.
504 Gateway Timeout: The upstream server accessed by the gateway or proxy acting as an intermediary did not respond in a timely manner.
505 HTTP Version Not Supported: The server is unable to process the request as it does not support the HTTP protocol version used.
506 Variant Also Negotiates: An internal configuration error on the server prevents it from completing the request.
507 Insufficient Storage: The server is unable to store the representation needed to fulfill the request.
508 Loop Detected: The server identified an infinite loop while processing the request.
510 Not Extended: The server requires further extensions to fulfill the request.
511 Network Authentication Required: The client is required to authenticate in order to access the network.