HTTP Status Codes
An HTTP Status-Code is a three-digit number that a server generates in response to a browser’s request.
Status-Code 404 is a relatively common Status-Code, which is returned when the server couldn’t find the resource (such as the webpage) that you had just requested.
Each and every time you visit a website, there is a conversation between the servers, and your browser or server sends a request to the site’s server, and in response the site’s server responds with an HTTP Status-Code.
There are six different HTTP Status-Code categories (or classes), and each one represents a different response. The first digit indicates the code category, while subsequent numbers identify the response within that category. A Reason-Phrase follows the code in explanation.
1XX — Informational code: This category is temporary and for information only. The server has received and acknowledges the request, and it is being processed.
2XX — Success codes: This status code category encompasses successful responses, indicating that the action requested by the client was received, understood, and accepted.
3XX — Redirection codes: The server received the request, but there’s a redirect to a different site in place because the resource is in a different location. Sometimes, there will be an additional action to perform, rather than a redirect.
4XX — Client error codes: This category indicates that the server couldn’t find or reach the page or website required due to an error on the site’s side.
·5XX — Server error codes: A valid request was made, but for some reason the request could not be fulfilled. This category includes errors on the server side. They can be detrimental to your SEO, as search engines can prompt crawlers to slow down with crawling and remove indexed URLs that continually return these errors.
6XX - Multi-sided error codes: Status-Codes that apply on both client side and server side.
The main codes are listed below.
Status-Codes
Status-Code | Reason-Phrase | Description |
---|---|---|
100 | Continue | This interim status code means the server received the initial request, and the client should continue. |
101 | Switching protocols | This code is a response to an Upgrade header field request where the server has been asked to switch protocols, and the server has agreed to do so. |
103 | Early hints | Used with the Link header and allows the browser to preload some response header resources while the server prepares the final HTTP response. |
200 | OK | This is the standard response for successful HTTP requests. The actual meaning of the response depends on the request method used:
|
201 | Created | The request was successfully completed, and a new resource was created. This is usually the response after POST or PUT requests. |
202 | Accepted | The request was accepted for processing, but is still in progress. It’s used for cases where another server handles the request or for batch processing. The request might or might not be eventually acted upon, and may be disallowed when processing occurs. |
203 | Non-Authoritative Information | The data returned isn’t from the origin server, but is a modified version collected from a third party. |
204 | No Content | The request was successfully processed, but is not returning any content. |
205 | Reset Content | The server fulfilled the request but asked the user to reset the document view, and is not returning any content. |
206 | Partial Content | The server is delivering only part of the resource. This response is used when a Range header has been sent to request only part of a resource or to split a download into multiple simultaneous streams. |
207 | Multi-Status | The Message Body is by default an XML message and can contain multiple separate response codes. This code provides the statuses of these multiple resources, depending on how many sub-requests were made. |
208 | Already Reported | The members of a DAV:propstat element have already been listed in a preceding part of the multi-status response and won’t be included again. |
226 | IM Used | The server completed a GET request. And the response indicates one or more instance-manipulation results. |
300 | Multiple Choices | The request has more than one possible response. And the user should choose one of them. This code could be used to present multiple video format options, to list files with different filename extensions, or to suggest word-sense disambiguation. |
301 | Moved Permanently | This redirect Status-Code indicates the requested resource has been permanently moved to a new URL. This and all future requests should be directed to the given new URL. |
302 | Found | This code indicates the requested resource has temporarily moved to a new URL. |
303 | See Other | The response to the request can be found under another URI. The server redirects the user to the requested resource with a GET request at another URL. |
304 | Not Modified | Used for caching purposes. The response hasn’t been modified since the version specified by the request headers If-Modified-Since or If-None-Match, so the client can continue to use the same cached version of the requested resource. |
305 | Use Proxy | The requested resource is available only through a proxy, the address for which is provided in the response. |
306 | Switch Proxy | No longer used. |
307 | Temporary Redirect | The requested resource has temporarily moved to a different URL. The only difference to the 302 code is that the user must not change the HTTP method used - for instance a POST request should be repeated using another POST request. |
308 | Permanent Redirect | The requested resource permanently moved to a different URL. The difference between this code and 301 is the user must not change the HTTP request method. |
400 | Bad Request | The server can’t or won’t process the request due to an apparent client error, such as invalid request message framing, deceptive request routing, or size too large. |
401 | Unauthorised | The authentication credentials are not valid to get the requested resource. Similar to 403 Forbidden. |
402 | Payment Required | Reserved for future use; it was initially intended for digital payment systems. It’s very rarely used, and no standard convention regulates it. |
403 | Forbidden | The request contained valid data and was understood by the server, but the server is refusing action. There are no access rights to the content. For example, it may require a password, or a prohibited action is being attempted. Unlike the 401 HTTP error code, the server does know the client’s identity. |
404 | Not Found | The server can’t find the requested resource, and no redirection has been set. |
405 | Method Not Allowed | The server supports the request method, but the target resource doesn’t. Such as a GET request on a form that requires data to be presented via a POST, or a PUT request on a read-only resource. |
406 | Not Acceptable | The server doesn’t find any content that satisfies the criteria given by the request, according to the Accept headers sent in the request. |
407 | Proxy Authentication Required | This is similar to a 401, but a proxy must authenticate the client to continue. |
408 | Request Timeout | The server timed out waiting for the request because the client didn’t produce a request within the allotted time. |
409 | Conflict | The server can’t fulfill the request because there’s a conflict with the resource. Information will be displayed about the problem so the client can fix it and resubmit. |
410 | Gone | The resource requested was previously in use but is no longer available and will not be available again. It has been permanently deleted from the server and will not be reinstated. |
411 | Length Required | The server rejects the request because it requires a defined Content-Length header field which has not been supplied. |
412 | Precondition Failed | The request indicates preconditions in the header fields that the server fails to meet. |
413 | Content Too Large | The client’s request is larger than the server’s defined limits, and the server refuses or is unable to process it. |
414 | URI Too Long | The URI requested by the client is too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request, in which case it should be converted to a POST request. |
415 | Unsupported Media Type | The request entity uses a media format the server does not support. |
416 | Range Not Satisfiable | The request asks for a portion of the file but the server cannot supply that portion. The server can’t fulfill the value indicated in the request’s Range header field. |
417 | Expectation Failed | The server can’t meet the requirements indicated by the Expect request header field. |
418 | I’m A Teapot | Created as an April Fool joke code, it is not expected to be implemented by actual HTTP servers. Although sometimes this Status-Code is also used as a response to a blocked request, instead of the more appropriate 403 Forbidden. |
421 | Misdirected Request | The request was sent to a server that is unable to produce a response. |
422 | Unprocessable Content | The request was correctly sent, but the server can’t process it because of semantic errors or similar issues. |
423 | Locked | The requested method’s resource is locked and inaccessible. |
424 | Failed Dependency | The request failed because it depended on another request, and that request failed. |
425 | Too Early | The server is unwilling to process a request that might be replayed. |
426 | Upgrade Required | The server refuses to process the request using the current protocol, unless the client upgrades to a different protocol. |
428 | Precondition Required | The original server needs the request to be conditional to prevent the lost update problem, where a client GETs a resource's state, modifies it, and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict. |
429 | Too Many Requests | Too many requests are being sent in a given amount of time. |
431 | Request Header Fields Too Large | The server is unwilling to process the request because either an individual header field is too big, or all the header fields collectively are too large. |
451 | Unavailable for Legal Reasons | The user requests a resource the server can’t legally provide. |
500 | Internal Server Error | A generic error message. The server has encountered an unexpected error and cannot complete the request. |
501 | Not Implemented | The server can’t fulfill the request or doesn’t recognize the request method. Usually this implies future availability. |
502 | Bad Gateway | The server acts as a gateway or proxy and gets an invalid response from an inbound upstream server. |
503 | Service Unavailable | The server is unable to process the request. This often occurs when a server is overloaded or down for maintenance. Generally, this is a temporary state. |
504 | Gateway Timeout | The server was acting as a gateway or proxy and timed out, waiting for a response. |
505 | HTTP Version Not Supported | The server doesn’t support the HTTP version used in the request. |
506 | Variant Also Negotiates | The server has an internal configuration error such as a circular reference. |
507 | Insufficient Storage | The server doesn’t have enough storage to process the request successfully. |
508 | Loop Detected | The server detects an infinite loop while processing the request. |
510 | Not Extended | Further extensions to the request are required for the server to fulfil it. |
511 | Network Authentication Required | The request entity must be authenticated to access the network. Intended for use by intercepting proxies used to control access to the network. The error should include a link where the user can submit credentials. |
604 | Inaccessible Request | The request either does not exist, or was recently deleted. |
605 | Not Allowed | When 403 Forbidden is bypassed, the website owner will give the person this error. This is because 403 is a client side code, while 605 is both client sided and server sided. |
644 | Request Deleted Or Modified | A request had been modified or deleted, causing this error to occur. |