HTTP or Hypertext Transfer Protocol is a standard protocol is use for to transfer hypertext documents that make the World Wide Web possible or In simple terms, we can say that HTTP defines messages format and how to send across the web. HTTP 4xx Status Codes are standard response codes issued by a server in response to a client’s request made to the server. All HTTP Status Codes have five classes:
- 1xx Informational
- 2xx Successful
- 3xx Redirection
- 4xx Client Error
- 5xx Server Error
Today we are going through 4xx Status Codes indicating that problem has occurred on the client-side. A 4xx error is an error that arises in cases where there is a problem with the user’s request, and not with the server.
In short, This type of error occurs because when a user’s access to a web page is restrict, the user misspells the URL or when a webpage is non-existent or removed from the public’s view.
4xx status codes are designed to inform a client that there is an issue on their end and there is nothing wrong with the server. For clients who are familiar with these errors, they are use for giving a client a hint as to what they can do to fix the problem.
LIST OF 4xx STATUS CODES
| 4xx Status Code | Description |
|---|---|
| 400 Bad Request | This status code is generated in cases where the server cannot process the request due to malformed syntax. It indicates that the request sent by the client was not formed properly and didn’t comply with HTTP protocol standards. To solve the problem, the client has to modify the request before sending it again to the server. |
| 401 Unauthorized Request | User authentication is required when this status code is generated. It may be that a user has completely failed to authenticate themselves or that something went wrong with the authentication process. |
| 402 Payment Required | This code isn’t yet active. It is reserved for future use. It was intended that this code to be used as part of some form of digital payment but that has not happened yet and this code is not widely used. |
| 403 Forbidden | The request sent to the server was a legal request, the server understood it but is refusing to fulfill it. The server prevents the request from going through because the user doesn’t have permission to the resource. The authorization will not help in this situation. This is a matter of permission but more of a forbidden operation. |
| 404 Not Found | This is the most common code that is displayed in the case where the page you were trying to reach on a website couldn’t be found on their server. |
| 405 Method Not Allowed | The methods to access resources on a web server are defined in the HTTP protocol but One can configure web servers in such a way that it restricts the methods through which its resources can be accessed. As a result, trying to access the resource using any of the methods which is restricted will generate this type of HTTP status code. |
| 406 Not Acceptable | When making a request, the client can indicate to the web server in which format it will accept the response. This status code is returned when the server detects that the response it can generate and return to the client is not acceptable by the client. It may be that exists in a different encoding method or different language from what the client is requesting. |
| 407 Proxy Authentication Required | You have to first provide a username or password with a proxy server before being allowed to access a resource. This occurs when you are going to log in on any web platform. If you have just entered your login information and then immediately see a 407 error, it means that one or both of your username or password were invalid. |
| 408 Request Timeout | This error code occurs when the client didn’t produce a request within the time that the server was prepared to wait. It is usually an indication of either connectivity problems or the webserver being overloaded. Making the same request at a later time without any modification is sometimes enough to solve the problem. |
| 409 Conflict | The server responds with this error when the client request is not completed due to a conflict with the current state of the resource. It occurs when a server encounters a conflict that is specific to an application.
The conflict here is usually unrelated to standard web server authority or security, but to specific applications conflict, not defined in HTTP protocol itself. |
| 410 Gone | It usually indicates that the requested resource is no longer available at the server and it won’t be available in the future. |
| 411 Length Required | When a client gets this error code, it is an indication that the request doesn’t specify the length of its content, which is required by the requested resource. To get the request accepted, the client has to modify the request by adding valid content. |
| 412 Precondition Failed | In some cases, a server is configured to accept requests once only certain conditions are fulfilled. The server responds with this error when the server doesn’t meet one of the preconditions that the requester put on the request header fields. |
| 413 Request Entity Too Large | The server responds with this error when the server is refusing to process the request because the request entity is larger than the server is willing or able to process. Take an example is a scenario involving a file upload. If there is a set limitation with regards to the file size, the upload may fail and this error will be encountered. |
| 414 Request URL Too Large | The server is refusing to service the request because the Request URL is longer than the server is willing or able to interpret. |
| 415 Unsupported Media Type | This error occurs when the web server declines to service the request because the format of the request is not supported by the resource. Take an example of uploading an image as img.svg but the server requires that image in a different format. |
| 416 Requested Range Not Satisfiable | The server returns this code when the request includes range-specifier values that are beyond the range that is allowed for the resource. For example, If the resource is an image file and has 1000 bytes and the range request is 500-1500, then it can’t be specified. |
| 417 Expectation Failed | The 417 error should only occur when the client sent an HTTP Expect header that the server could not fulfill, which doesn’t relate in any way to the application’s “expected inputs” in the request. |
| 421 Misdirected Request | This error occurs when the request was directed at the server that is not able to produce a response. |
| 422 Unprocessable Entity | The status code means the server understands the content type of the request entity and the syntax of the request entity is correct but was unable to process the contained instructions.
For example, this error condition may occur if an XML request body contains well-formed but semantically error XML instructions. |
Conclusion
HTTP status codes essentially provide information on whether a page loaded correctly or not, and if the page isn’t loading correctly then what’s the cause behind this.
While all HTTP status codes have a valid purpose, the 4xx status codes are the ones that you are more likely to encounter. Sometimes error messages can be helpful, according to that error message you can fix HTTP 4xx error messages in different ways.
The most common method is to check the URL to make sure that you haven’t made any spelling mistakes. Clearing cookies and cache can also work in some cases where expired and invalid cookies are used. It is enough to fix a “400 Not Found” error. Refreshing the page, Restarting your computer, confirming your login credentials on the right URL, and simply trying later will help you to avoid most error messages.
However, It’s worth remembering that any disruption to the user experience should be avoid where possible.
References:
- Dusseault, Lisa, ed. (June 2007). HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV).
- Khare, R; Lawrence, S. “Upgrading to TLS Within HTTP/1.1”
- Nottingham, M.; Fielding, R. (April 2012). “RFC 6585 – Additional HTTP Status Codes”
- Bray, T. (February 2016). “An HTTP Status Code to Report Legal Obstacles”
- Wikipedia. “List of HTTP status codes – Wikipedia”


EW Signature
EW Duplicate Finder
EW Stripe Integration
EW User Clone
EW Dropbox Integration
EW One Drive Integration
EW Google Drive Integration
EW Box Integration
0 Comments