List of 4xx HTTP Status Codes with Explanation
Internet uses HyperText Transmission Protocol (HTTP) to send and receive data. For each request received from a web browser, the server sends a three digits HTTP response code. Each code in the response indicates a different meaning and in this article let us give a list of 4xx status codes.
Types of HTTP Status Codes
HTTP response codes are classified into the following five categories:
- 1xx status codes for information
- 2xx status codes for success
- 3xx status codes for redirection
- 4xx status codes for client errors
- 5xx status codes for server errors
HTTP 4xx Status Codes
HTTP status codes of 4xx series are received in the server response when there is an error in the request from the client. It indicates the browser sent a wrong request with an error that can’t be processed by the web server. You need to check the browser and send the correct request again to get the proper response. Here is a complete list of HTTP 4xx status codes with explanation.
|4xx Status Code||Description||Explanation|
|400||Invalid Request||The webserver cannot fulfill the received request because of incorrect syntax and sends a code “400 - Bad Request” in a response.|
|401||Unauthorized Request||Code “401 – Unauthorized” is received when a user try to access the authenticated resource. The server yet to receive an authentication or received incorrect authentication. Simple example is a webpage authenticated by a user id and password typically for a registered user.|
|402||Payment Required||This code was created to use during an online payment is required but currently not used for that purpose. Some servers use 402 code for different purposes like to inform too many requests received from a particular IP address.|
|403||Access to Resource Forbidden||“403 – Forbidden” code is received when a server receive a valid request but deny to respond. This is different from the “401 – Unauthorized” whereas the request needs to be authorized with a password, but authentication will not have any impact in 403 code. An example for 403 code is a registered user trying to access a restricted page.
|404||Resource Not Found||The “404 - Page Not Found” error code is displayed when a requested resource is no more available in the server. The reason could be that the site owner deleted the page or changed the URL without setting a 301 redirect. The requested resource may or may not be available in future, hence further requests for the same resource is permitted.
|405||Method not allowed||“405 – Method Not Allowed” is an error received if the request method mentioned in the request is not supported for the resource. If a search engine crawler encounters this error then the URL will not be indexed.|
|406||Not Acceptable Request||When the requested resource exists but in different format then the server responds with the code “406 – Not Acceptable”. The reason for not supporting could be the language or encoding method mentioned in the request.|
|407||Firewall, Proxy Authentication Required||Proxy server authentication is required for the client itself and the code “407 - Proxy Authentication Required” is received.|
|408||Request Timeout||Server should receive the request from client within the specified time. If the client did not send the complete request within the specified time then the server responds with the timeout error “408 – Request Timeout”.|
|409||Conflict||When the request received by the server is in conflict with another request received or with server configuration then code “409 – Conflict” is received.|
|410||Resource Unavailable||When a requested resource is permanently deleted from the server then the code “410 – Gone” is received. The difference between 404 and 410 is that the pages with code 404 can still be requested multiple times but the pages with code 410 should not be requested again. Search engines will remove the pages with 410 error code from the indices whereas pages with code 404 will be requested again by the crawlers.|
|411||Length Required||When the request is sent by the client without mentioning the content length which is required then the server rejects the requests with the reason code as “411 – Length Required”. The request header needs to be corrected and transmitted to the server in order to get a correct response.|
|412||Precondition Failed||If a server encounter a discrepancy on preconditions during processing of the request header then returns the ode “412 - Precondition Failed”.|
|413||Request Entity Too Large||The HTTP status code 413 is received when the server rejects a request due to the reason that the received request is too long for the server to process.|
|414||Request URL Too Long||The HTTP status code 414 is received when the server rejects a request due to the reason that the URL of the requested resource is too long for the server to process.|
|415||Unsupported Media Type||When the request body contains a media type which is not supported by the server then server rejects the request and the code “415 - Unsupported Media Type is received”. For example when a user try to submit a form along with an attachment which is not supported by the server then the upload will fail and code 415 will be received in the server response.|
|416||Requested Range Not Satisfiable||When the range field in the header of the request is not acceptable by the server then the server rejects the request and sends the code “416 - Requested Range Not Satisfiable”.|
|417||Expectation Failed||When the Expect field in the request header does not match the server’s expectation then the code “417 - Expectation Failed” is received.|
|422||Unprocessable Entity||When the server can’t process one or more elements in the received request then the code “422 - Unprocessable Entity” is received.|
|423||Locked||When the requested resourced is locked by another request then the server rejects the request and sends the code “423 – Locked” in the response.|
|424||Failed Dependency||When the server rejects the request due to the failure of the previous requests then the code “424 – Failed Dependency” is received.|
|426||Upgrade Required||When the server requesting for a connection upgrade which is not supported by the client then the code “426 - Upgrade Required” is received.|
Other 4xx Status Codes
There are other 4xx codes used as non-standard codes. Some of the examples are as below:
- 420 Enhance Your Calm – is used in Twitter search when the user sends too many requests within a short period.
- 444 – No Response – is used in Nginx logs when the server does not return any response and closed the connection for the client.
- 451 – Redirect – is used by Microsoft’s Exchange ActiveSync when the server can’t access user’s mailbox.