The 5 Classes of HTTP Status Codes Cheat Sheet
To simplify things, HTTP Status Codes were grouped into 5 classes by the IETF (Internet Engineering Task Force) when the standards were created. Here’s a quick breakdown of these classes:
- 100s: These are informational codes that show the request from the browser is still in progress.
- 200s: These success codes indicate that the server has received, understood, and processed the browser’s request.
- 300s: These redirection codes are used when a new location is provided for the requested resource.
- 400s: These client error codes signal issues with the request made by the browser.
- 500s: These server error codes mean the server accepted the request but encountered an error preventing it from being delivered.
List of HTTP Status Codes Cheat Sheet
100 Status Codes – Informational Responses
-
100: Continue – This code means the server has received your browser’s request headers and is ready to receive the request body.
-
101: Switching Protocols – Indicates that your browser has requested the server to change protocols, and the server has agreed.
-
103: Early Hints – Provides some response headers before the final HTTP message is sent.
200 Status Codes – Success Responses Cheat Sheet
-
200: OK – The standard response for successful HTTP requests.
-
201: Created – Indicates that the request has been fulfilled and a new resource has been created.
-
202: Accepted – The request has been accepted for processing, but it’s not yet completed. The request might or might not be acted upon and could be rejected later.
-
203: Non-Authoritative Information – This code appears when a proxy server, which received a 200 OK response from the origin server, has modified the response before passing it to your browser.
-
204: No Content – The server has successfully processed the request but will not return any content.
-
205: Reset Content – Similar to the 204 code, the server has processed the request successfully, but it will not return content, and the document view will be reset.
-
206: Partial Content – This code is used when a range header causes the server to send only part of the requested resource, useful for resuming downloads or splitting them into multiple streams.
300 Status Codes – Redirection Responses Cheat Sheet
-
300: Multiple Choices – Indicates that there are multiple options for the server to respond with to fulfill the request. Your browser must choose between these options, such as different file formats or resources.
-
301: Moved Permanently – The requested resource has been permanently moved to a new location. This code is used for permanently redirecting URLs from one location to another.
-
302: Found – The resource requested has been moved temporarily. The code indicates that the resource was found, but not at the location expected. It’s used for temporary URL redirections.
-
303: See Other – This code informs your browser that the resource can be found via a different HTTP request method. For example, after using POST, PUT, or DELETE, you should use GET to retrieve the resource from a different URL.
-
304: Not Modified – The resource has not changed since the last time you accessed it. This code tells your browser it can use the cached version of the resource.
-
307: Temporary Redirect – Replaces the 302 code for temporary redirections. It tells the browser that the resource has been temporarily moved to a different URL, and it should use the same method for future requests.
-
308: Permanent Redirect – Serves as an update to the 301 code, indicating that the resource has been permanently moved to a new URL.
400 Status Codes – Client Error Responses Cheat Sheet
-
400: Bad Request – This code means the server cannot return a response due to an error on the client’s side.
-
401: Unauthorized – Indicates that access to the resource is denied because proper authorization credentials are missing. If using htpasswd authentication, you’ll see this error if login details are incorrect.
-
402: Payment Required – Originally intended for a different use, this code now indicates payment issues on some platforms, such as exceeding API request limits or unpaid service fees.
-
403: Forbidden – Returned when access to the requested resource is denied. Commonly seen if trying to access protected content without proper login.
-
404: Not Found – The requested URL or content is not on the server. This is the classic “Page Not Found” error.
-
405: Method Not Allowed – This code is used when the server supports the request method, but the target resource does not.
-
406: Not Acceptable – The resource can only generate content that is not acceptable based on the request’s accepted headers.
-
407: Proxy Authentication Required – A proxy server requires authentication from your browser to continue.
-
408: Request Timeout – The server timed out waiting for the rest of the request from the browser.
-
409: Conflict – Occurs when the server cannot process the request due to a conflict with the resource, often due to simultaneous edits.
-
410: Gone – Indicates that the requested resource is permanently gone and will not return, distinguishing it from a 404 error by indicating that this is expected.
-
411: Length Required – The server requires a specific length to be specified by the client, but it was not provided.
-
412: Precondition Failed – The server did not meet the conditions specified in the request headers.
-
413: Payload Too Large – The request is larger than what the server is able to process.
-
414: URI Too Long – The request URI is too long for the server to process, usually from a large query string.
-
415: Unsupported Media Type – The server does not support the media type of the request.
-
416: Range Not Satisfiable – The request was for a portion of a resource that the server cannot return.
-
417: Expectation Failed – The server cannot meet the requirements of the Expect request header field.
-
418: I’m a Teapot – An April Fools’ joke code indicating that a teapot refuses to brew coffee.
-
422: Unprocessable Entity – The server cannot process the request due to semantic errors in the client’s request.
-
425: Too Early – The server is unwilling to process the request as it may be a replay.
-
426: Upgrade Required – The client must switch to a different protocol as specified in the Upgrade header field.
-
428: Precondition Required – The server requires specific conditions to be met before processing the request.
-
429: Too Many Requests – Generated when the client has sent too many requests in a given timeframe, often a rate-limiting issue.
-
431: Request Header Fields Too Large – The server cannot process the request because the header fields are too large.
-
451: Unavailable For Legal Reasons – Access to the resource is restricted due to legal demands. It’s also a nod to the novel “Fahrenheit 451.”
-
499: Client Closed Request – This code, used by NGINX, indicates that the client closed the request while NGINX was still processing it.
500 Status Codes – Server Error Responses Cheat Sheet
-
500: Internal Server Error – This generic code indicates that there was an error on the server, and the request could not be completed. It means something went wrong on the server, making the requested resource unavailable.
-
501: Not Implemented – Indicates that the server does not support the functionality required to fulfill the request.
-
502: Bad Gateway – This error typically occurs when one server receives an invalid response from another server, such as when a proxy server is involved.
-
503: Service Unavailable – The server is currently unable to handle the request, possibly due to being overloaded or down for maintenance.
-
504: Gateway Timeout – Occurs when the server, acting as a gateway, times out waiting for a response from another server involved in processing the request.
-
505: HTTP Version Not Supported – The server does not support the HTTP version used in the request.
-
511: Network Authentication Required – Sent when the network you’re using requires authentication before your request can be processed. This often happens with public hotspots where you must agree to terms and conditions.
-
521: Web Server Is Down – A Cloudflare-specific error indicating that while Cloudflare’s network is accessible, it cannot connect to the origin server.
-
525: SSL Handshake Failed – Indicates a failure in the SSL handshake between a domain using Cloudflare and the origin server.
Other status codes
There is a Wikipedia article with a list of all of the HTTP Status Codes if you are interested.