We’ve all been there: You’re mindlessly scrolling the web when suddenly you’re prevented from continuing a search due to an HTTP error code. This can be a frustrating experience as a user. However, HTTP status codes go beyond simply communicating an error – these codes can also signify a successful transmission, or a re-direct to a new site URL. When trying to access a webpage, your browser sends out a request to the web server where the webpage is hosted.
Depending on whether the transmission was successful or not, the web server can return a select number of responses. These are called HTTP status codes. They vary from informational and successful ones to re-directs and error codes. Each status code is marked with a numerical identifier, ranging between 100 and 599. All of the codes and their meanings are maintained by the Internet Assigned Numbers Authority (IANA).
Here is an exhaustive list of HTTP status codes and what they mean.
1xx HTTP status codes: Informational responses
The 1xx response codes are informational. They indicate that your web browser has made a request to the server and is waiting for a response.
- HTTP Status Code 100 (Continue): The server has received your browser’s request header and is now waiting for the body of your request.
- HTTP Status Code 101 (Switching Protocol): Your browser has sent a request for a change of protocol and the server has complied.
- HTTP Status Code 102 (Processing): Your browser’s request is being processed by the server, but no response from the server is available yet.
- HTTP Status Code 103 (Early Hints): The server is sending some “early hints” to your browser to preload certain resources before the server provides a final response.
2xx HTTP status codes: Successful responses
These status codes inform the client (your web browser) that everything is processing as it should.
- HTTP Status Code 200 (OK): The request is successful and the appropriate response has been provided. Depending on the HTTP method (GET, HEAD, PUT/POST or TRACE), the response will vary.
- HTTP Status Code 201 (Created): Your browser’s request has succeeded and, as a result, a new resource has been created. This is the usual response to a POST and some PUT requests.
- HTTP Status Code 202 (Accepted): The server has received your browser’s request, but has not yet acted upon it.
- HTTP Status Code 203 (Non-Authoritative Information): The server is returning meta-information not from the origin server, because the meta-information currently available may be different. This is used for when the information is collected from a third-party or a local copy.
- HTTP Status Code 204 (No Content): Following a successful request, the server has no content to return. However, it may return current header information, so that your user-agent updates its cached headers.
- HTTP Status Code 205 (Reset Content): Your browser has received a response from the server to change the document view.
- HTTP Status Code 206 (Partial Content): The server has returned a part of the content, because your browser has requested it with the Range header.
- HTTP Status Code 207 (Multi-Status): For specific situations, where multiple status codes are needed, the server returns information about multiple sources.
- HTTP Status Code 208 (Already Reported): To avoid unnecessary enumeration, the server returns information that the internal members of a WebDAV element have already been reported Typically, this response follows a 207 (Multi-Status) response.
- HTTP Status Code 226 (IM Used): The server has successfully processed a GET method by your browser to retrieve an updated version of an already cached resource. Generally, the response is returned when there were one or more slight modifications to the requested resource.
3xx HTTP status codes: Redirection responses
The status codes in the 300-399 range convey that the desired content has been moved to a different place and lets the browser know where it can be found.
- HTTP Status Code 300 (Multiple Choices): There are multiple responses available for the request your web browser has made.
- HTTP Status Code 301 (Moved Permanently): The server redirects your browser to a different URL because the desired resource has been moved permanently to a new location.
- HTTP Status Code 302 (Found): Your browser has received a response that the requested resource has been temporarily moved to a different location. However, the same URL should be used for any subsequent requests.
- HTTP Status Code 303 (See Other): The server informs the browser that the desired resource is located at a different URL and should be requested with a GET method.
- HTTP Status Code 304 (Not Modified): The returned response tells the web browser that the desired resource hasn’t been changed since the last time it was requested. As a result, the browser should use the cached version it has in store.
- HTTP Status Code 305 (Use Proxy): The server requires a proxy in order to return the requested resource. This response code is not currently in use because most current browsers do not support it due to security issues.
- HTTP Status Code 306 (Switch Proxy): The server requires the use of a specific proxy in order to fulfil subsequent requests. Similarly, this response message is not supported on account of security concerns.
- HTTP Status Code 307 (Temporary Redirect): A replacement for the 302 (Found) status code, the server informs the browser the desired resource is temporarily located at a different location. However, the same HTTP method must be used when requesting the resource.
- HTTP Status Code 308 (Permanent Redirect): A successor to the 301 (Moved Permanently) status code, your web browser is trying to access a resource, which has been permanently moved to a new location. This type of redirect does not allow the HTTP request method to change.
4xx HTTP status codes: Client Error responses
These status codes indicate that errors caused by the client are present.
- HTTP Status Code 400 (Bad Request): There is an error on the client’s side and, as a result, the server cannot return a response.
- HTTP Status Code 401 (Unauthorized): The server requires authentication in order to let the web browser proceed to the requested resource.
- HTTP Status Code 402 (Payment Required): As the name suggests, this code is reserved for digital payment systems. However, it’s not widely used.
- HTTP Status Code 403 (Forbidden): The web browser is denied access to the requested source due to the client not having the necessary permissions.
- HTTP Status Code 404 (Not Found): The desired resource cannot be found, but may be available in the future.
- HTTP Status Code 405 (Method Not Allowed): The server recognizes the HTTP request method used by the web browser, but requires the use of a different one in order to provide the desired resource.
- HTTP Status Code 406 (Not Acceptable): The server informs the client that no resource fits the criteria requested by your web browser.
- HTTP Status Code 407 (Proxy Authentication Required): Similar to the 401 (Unauthorized) status code, but the server requires authentication to be done by a proxy.
- HTTP Status Code 408 (Request Timeout): The server timed out waiting for the client to send a request within the specified time frame.
- HTTP Status Code 409 (Conflict): There is a conflict with the current state of the desired resource, as a result, the server cannot return a response.
- HTTP Status Code 410 (Gone): Not unlike the 404 (Not Found) status code, but it indicates the requested resource will not be available again in the future.
- HTTP Status Code 411 (Length Required): The server informs your web browser it requires the request to include specific content length in order to return the desired resource.
- HTTP Status Code 412 (Preconditioned Failed): Your web browser has issued a request with preconditions, one of which could not be met by the server.
- HTTP Status Code 413 (Payload Too Large): The server is not willing to process the request because it’s too large.
- HTTP Status Code 414 (URL Too Long): The request sent out by your web browser cannot be processed by the server because the client has encoded too much data as a query string, which is then sent as a GET method.
- HTTP Status Code 415 (Unsupported Media Type): The request has been refused by the server because it does not support the desired media type.
- HTTP Status Code 416 (Range Not Satisfiable): The server cannot provide the portion requested by the client.
- HTTP Status Code 417 (Expectation Failed): Your web browser has sent out a request to the server with the Expect header, but the server cannot fulfill the requirements.
- HTTP Status Code 418 (I’m a Teapot): An HTTP Easter Egg, which was part of an April Fools’ joke. HTTP servers are not expected to implement this protocol, but if you’re curious what it looks like, check out Google’s Teapot page.
- HTTP Status Code 421 (Misdirected Request): Your web browser’s request has been redirected to a different server, which was unable to produce a response.
- HTTP Status Code 422 (Unprocessable Entity): There were semantic errors in the request sent out by your web browser and, as a result, could not be followed.
- HTTP Status Code 423 (Locked): Access to the desired resource is denied because it’s locked.
- HTTP Status Code 424 (Failed Dependency): The request sent out by your web browser failed because it depended on another request, which also failed.
- HTTP Status Code 425 (Too Early): The server refuses to process a request because it might be replayed.
- HTTP Status Code 426 (Upgrade Required): The current protocol is not accepted by the server, thus the server returns an Upgrade header to the client with a request for a protocol update.
- HTTP Status Code 428 (Precondition Required): The web browser must specify conditions for the server to process its request.
- HTTP Status Code 429 (Too Many Requests): The server has received too many requests by your web browser in the allotted waiting time.
- HTTP Status Code 431 (Request Header Fields Too Large): The client’s request is not being processed by the server because the provided request headers are too large. The server is willing to process the request after the headers are resized.
- HTTP Status Code 451 (Unavailable For Legal Reasons): The server refuses to provide the desired resource due to legal reasons.
5xx HTTP status codes: Server Error responses
The 5xx status codes indicate that the server has failed to process a request.
- HTTP Status Code 500 (Internal Server Error): This is a generic error message, provided by the server, when an unexpected condition was encountered.
- HTTP Status Code 501 (Not Implemented): The server indicates it is either unable to fulfill the request or it does not recognize the HTTP method.
- HTTP Status Code 502 (Bad Gateway): The server returns a response that it served as a gateway or proxy for an upstream server, which provided an invalid response.
- HTTP Status Code 503 (Service Unavailable): The server cannot process the request because it is either overloaded or it is under maintenance.
- HTTP Status Code 504 (Gateway Timeout): The upstream server hasn’t provided a timely response to the second server, currently serving as a gateway or proxy. As a result, it cannot provide a response to the client.
- HTTP Status Code 505 (HTTP Version Not Supported): The server doesn’t support the HTTP method used in the request.
- HTTP Status Code 506 (Variant Also Negotiates): Given that HTTP allows multiple variants of a resource to reside under one URL, the server can’t decide which (best) version to provide as a response. This is usually due to a server configuration problem.
- HTTP Status Code 507 (Insufficient Storage): The server is unable to store the representation of the desired resource needed to successfully fulfill the request.
- HTTP Status Code 508 (Loop Detected): The server has detected an infinite loop and cannot process the request.
- HTTP Status Code 510 (Not Extended): The server implements additional extensions, which need to be specified in the request header in order for the server to fulfill it.
- HTTP Status Code 511 (Network Authentication Required): Authentication must be provided by the client so the server can grant access to the client.