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.

HTTP Request and Response Over Web
HTTP Request and Response Over Web

Types of HTTP Status Codes

HTTP response codes are classified into the following five categories:

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 CodeDescriptionExplanation
400Invalid RequestThe webserver cannot fulfill the received request because of incorrect syntax and sends a code “400 - Bad Request” in a response.
401Unauthorized RequestCode “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.
402Payment RequiredThis 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.
403Access 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.

403 - Access Forbidden Error

404Resource Not FoundThe “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.

404 - Page Not Found
405Method 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.
406Not Acceptable RequestWhen 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.
407Firewall, Proxy Authentication RequiredProxy server authentication is required for the client itself and the code “407 - Proxy Authentication Required” is received.
408Request TimeoutServer 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”.
409ConflictWhen the request received by the server is in conflict with another request received or with server configuration then code “409 – Conflict” is received.
410Resource UnavailableWhen 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.
411Length RequiredWhen 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.
412Precondition FailedIf a server encounter a discrepancy on preconditions during processing of the request header then returns the ode “412 - Precondition Failed”.
413Request Entity Too LargeThe 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.
414Request URL Too LongThe 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.
415Unsupported Media TypeWhen 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.
416Requested Range Not SatisfiableWhen 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”.
417Expectation Failed When the Expect field in the request header does not match the server’s expectation then the code “417 - Expectation Failed” is received.
422Unprocessable EntityWhen the server can’t process one or more elements in the received request then the code “422 - Unprocessable Entity” is received.
423LockedWhen the requested resourced is locked by another request then the server rejects the request and sends the code “423 – Locked” in the response.
424Failed DependencyWhen the server rejects the request due to the failure of the previous requests then the code “424 – Failed Dependency” is received.
426Upgrade RequiredWhen 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.
HTTP Status Codes Guide
HTTP Status Codes Guide

Editorial Staff at WebNots are team members who love to build websites and share the learning with webmasters community. Connect with us in Facebook and Twitter.

Recommended Articles:

4 thoughts on “List of 4xx HTTP Status Codes with Explanation”

Leave your response.

Leave a Comment