HTTP Status Codes cheat sheet

Ultimate cheat sheet for HTTP Status Codes 🚀

banner

Ever wondered what those numbers like 404 or 200 mean when you browse the web? They're like messages from the internet/server, telling you if everything's okay or if there's a problem. 

In this blog, you will find list of all HTTP status codes and meaning of those codes. 

Basically these status codes are divided into different categories as shown below, each status code have its own meaning and use, if you are programmer or coder than you should know these status codes because it will be useful in your day to day life.

1XX Information : 

100 - Continue 
  • Indicates that the initial part of the request has been received and the client should proceed to send the remaining part.
101 - Switching Protocols
  • Informs the client that the server is switching to a different protocol as requested by the client.
102 - Processing
  • Serves as an interim response to inform the client that the server has received the request and is still processing it.
103 - Early Hints
  • Provides some headers to the client before the final response, allowing it to start loading resources in parallel based on the provided hints.

2XX Success : 

200 - OK
  • Indicates that the request was successful, and the server has returned the requested data.
201 - Created
  • Informs the client that the request has resulted in the creation of a new resource on the server.
202 - Accepted
  • Acknowledges the request but indicates that it is not yet processed, typically used for asynchronous operations.
203 - Non-Authoritative Information
  • Serves as a response to a successful request but with information from a third-party source.
204 - No Content
  • Indicates that the request was successful, but there is no data to return in the response.
205 - Reset Content
  • Instructs the client to reset its view, often used in conjunction with form submissions.
206 - Partial Content
  • Indicates that the server is sending a portion of the requested resource, often used for large downloads with range requests.
207 - Multi-Status (WebDAV)
  • Used in WebDAV to represent multiple status codes for different parts of a multi-operation request.
208 - Already Reported (WebDAV)
  • Indicates that the members of a DAV binding have already been enumerated.
226 - IM Used (HTTP Delta Encoding)
  • IM Used (HTTP Delta Encoding): Informs the client that the server is using HTTP delta encoding for the response.

3XX Redirection : 

300 - Multiple Choices
  • Indicates that the requested resource has multiple representations, and the user or agent must choose one.
301 - Moved Permanently
  • Informs the client that the requested resource has been permanently moved to a new location.
302 - Found
  • Indicates a temporary redirection to a different URL while retaining the original URL for future use.
303 - See Other
  • Instructs the client to redirect to another resource, often used after a POST request to prevent form resubmission.
304 - Not Modified
  • Tells the client that the resource hasn't been modified since the specified time, so it can use its cached version.
305 - Use Proxy
  • Suggests that the client should use a proxy server to access the requested resource.
306 - Unused
  • This status code was used in a previous version of the HTTP protocol but is no longer used.
307 - Temporary Redirect
  • Similar to 302, it indicates a temporary redirection to a different URL while preserving the original URL.
308 - Permanent Redirect
  • Informs the client that the requested resource has been permanently moved to a new location, similar to 301, but without changing the request method.

4XX Client Error : 

400 - Bad Request
  • Indicates that the server cannot process the request due to a client error or malformed request.
401 - Unauthorized
  • Informs the client that authentication is required to access the requested resource.
402 - Payment Required
  • This status code was defined in the HTTP/1.1 specification but is not commonly used. It was intended to indicate a payment requirement, which is rarely used in practice.
403 - Forbidden
  • Indicates that the server understands the request, but the client does not have permission to access the requested resource.
404 - Not Found
  • Informs the client that the requested resource could not be found on the server.
405 - Method Not Allowed
  • Indicates that the HTTP method used in the request is not supported for the requested resource.
406 - Not Acceptable
  • Informs the client that the server cannot produce a response matching the list of acceptable values defined in the request's headers.
407 - Proxy Authentication Required
  • Indicates that the client must authenticate itself with the proxy server before making the request.
408 - Request Timeout
  • Indicates that the server terminated the request because it took too long to complete.
409 - Conflict
  • Indicates a conflict with the current state of the resource, often used in scenarios where two clients are attempting to modify the same resource simultaneously.
410 - Gone
  • Indicates that the requested resource is no longer available on the server and will not be available again.
411 - Length Required
  • Informs the client that a request with a content body must specify the length of that content.
412 - Precondition Failed
  • Indicates that one or more conditions specified in the request headers evaluated to false on the server.
413 - Payload Too Large
  • Indicates that the server refuses to process the request because the request entity (such as an uploaded file) is too large.
414 - URI Too Large
  • Informs the client that the requested URI (Uniform Resource Identifier) is too long for the server to process.
415 - Unsupported Media Type
  • Indicates that the server refuses to accept the request because the request entity's media type is not supported.
416 - Range Not Satisfiable
  • Indicates that the server cannot satisfy the requested Range header in the request.
417 - Exception Failed
  • Informs the client that one or more Expect request headers could not be met by the server.
418 - I'm a teapot
  • This is an April Fools' joke status code not meant for serious use. It's for fun and not a standard part of HTTP.
421 - Misdirected Request
  • Indicates that the request was directed at a server that is not able to produce a response. This can happen in some load balancing or routing scenarios.
422 - Unprocessable Entity (WebDAV)
  • Typically used in WebDAV applications, it indicates that the server understands the request but cannot process it due to semantic errors.
423 - Locked (WebDAV)
  • Also used in WebDAV, it indicates that the resource is locked for editing by another user.
424 - Failed Dependency (WebDAV)
  • In WebDAV, it indicates that the request failed because it relied on another request that failed.
425 - Too Early
  • Indicates that the server is unwilling to risk processing a request that might be replayed, such as an early SSL/TLS renegotiation request.
426 - Upgrade Required
  • Informs the client that it must switch to a different protocol to access the requested resource.
428 - Precondition Required
  • Indicates that the server requires the client to include specific headers in the request to access the resource.
429 - Too Many Requests
  • Indicates that the client has exceeded the rate limits or request limits imposed by the server.
431 - Request Header Fields Too Large
  • Informs the client that the server is refusing to process the request because the request headers are too large.
451 - Unavailable for Legal Reasons
  • Serves as an HTTP status code indicating that the requested resource is unavailable due to legal reasons, such as censorship or copyright issues.
499 - Client Closed Request
  • Indicates that the client closed the connection before receiving a complete server response, often seen in cases of client timeouts or connection issues.

5XX Server Error Responses : 

500 - Internal Server Error
  • Indicates a generic server error, often caused by an issue with the server's code or configuration.
501 - Not Implemented
  • Informs the client that the server does not support the functionality required to fulfill the request.
502 - Bad Gateway
  • Typically used in a reverse proxy scenario, it indicates that the server acting as a gateway or proxy received an invalid response from an upstream server.
503 - Service Unavailable
  • Informs the client that the server is temporarily unable to handle the request due to overload or maintenance.
504 - Gateway Timeout
  • Indicates that an upstream server or proxy did not respond within a timely manner.
505 - HTTP Version Not Supported
  • Informs the client that the HTTP version used in the request is not supported by the server.
507 - Insufficient Storage (WebDAV)
  • Typically used in WebDAV applications, it indicates that the server is out of storage space.
508 - Loop Detected (WebDAV)
  • Also used in WebDAV, it indicates that a server has detected an infinite loop while processing the request.
510 - Not Extended
  • Informs the client that further extensions to the request are required for it to be fulfilled.
511 - Network Authentication Required
  • Indicates that the client must authenticate itself to access the network.
599 - Network Connect Timeout Error
  • This is a non-standard status code often used by some HTTP proxies to indicate a network connection timeout error.
Thanks for reading this article, if you found this article useful then share it with your friends and share your thoughts in comment section.

Comments