What is a 4xx status code?
When there is something wrong on the user's end, 4xx status codes are sent by the server to inform about the exact cause of the error.
In simple terms, when you see a 4xx status code - it usually means there's a problem on the user's end. It's like the server saying, Hey, there's an issue with what you're trying to do and it's on your side, not mine.
The user needs to modify or fix their request to resolve the issue and receive a successful response.
Types of 4xx status code
All the errors - from 400 to 499 - have particular meanings that help troubleshoot the problem. We will discuss the most common ones only.
400 Bad Request
If you come across this error, it means there's a problem with how the web address is written, there are messed-up files on the website or the cookies have expired.
The error may be displayed in various ways, such as:
This page isn't working at the moment. If the problem continues, contact the site owner.
Your client has issued a malformed or illegal request. That's all we know.
Request header or cookie too large.
You may run into this error if the login information you're providing isn't right or verified. The common reasons can be those of 400 errors. It can also be a result of an incorrect username or password.
You can have the following messages:
402 Payment Required
The 402 status code was originally created to be used in digital payment systems within the context of HTTP response codes.
However, it has not been broadly adopted or used in real-world applications and there isn't a universally agreed-upon standard for its use.
Consequently, this status code is still reserved for potential future implementation in digital payment systems or other applications that may arise within the HTTP response code framework.
As an example, a retail website might utilize the 402 status code to notify a user about specific payment-related issues such as a problem with their payment card or other payment methods.
If you see this error that means you're not allowed to get into a particular website even if your login details are fine.
It could be because the website owner wants to keep things private or they might have made a mistake while setting permissions.
The error may display messages like:
You don't have permission to access
404 Not Found
The 404 Not Found error is a standard HTTP response code that occurs when the requested resource or webpage cannot be found on the server.
This error results from broken links which are hyperlinks that do not connect a user to an external webpage because the page has been deleted or moved.
Common variations of this error message include:
This page doesn’t exist.
The requested URL was not found on this server.
405 Method Not Allowed
This error is related to HTTP methods which are used to instruct the server to perform a specific action.
It happens when the server doesn't understand or allow the specific way you're asking it to do things. This could be because the server is set up wrong or intentionally limited for security reasons.
406 Not Acceptable
This error happens when the server can't give the kind of answer the user is looking for or when its response breaks some rules set by the user.
In this situation, the client has specified its acceptable content types in the request but the server is unable to deliver a response that meets those criteria.
407 Proxy Authentication Required
It is similar to the 401 Unauthorized error - both of which are caused by invalid or missing authentication credentials.
The key difference is that the 407 error requires authentication credentials for a proxy server rather than the main server.
In this case, the client needs to provide valid credentials to authenticate before it can access the requested resource on the main server.
408 Request Timeout
When the client's request takes too long to complete, it causes the server to time out and results in 408 Request Timeout.
This can happen when the server is too busy or overwhelmed to process the client's request in a timely manner.
Common root causes for this error include connectivity issues and heavy traffic.
This error can be considered a request-resource conflict. It occurs when there is an inconsistency between the client's request and the current state of the resource on the server.
Imagine you are trying to upload a file that's older than what's already on the server. That could cause this error. It can also happen if there's mixed-up or conflicting information.
Like if two people are trying to edit the same thing at the exact same time - the server gets confused because it's trying to handle these requests.
The 410 Gone status code indicates that the requested page or resource has been permanently removed and is no longer available. As a result, the server cannot process the request.
411 length required
This error occurs when an HTTP request is missing a required "Content-Length" header that specifies the size of the message body. An HTTP request usually consists of the following components:
412 Precondition Failed
It happens when the server is unable to meet certain conditions specified in the "headers" of the client's request.
The client may set specific conditions using headers like "If-Match" or "If-Unmodified-Since" expecting the server to only process the request if those conditions are met. If the server cannot fulfil these conditions - it returns a 412 Precondition Failed error.
413 Payload Too Large
When the size of the file or data being uploaded in a client's request exceeds the server's allowed limit - a 413 Payload error occurs.
You might see messages such as:
Request entity too large
Your client issued a request that was too large
414 request URI Too Long
It occurs when the length of the client's request URI (Uniform Resource Identifier) is too long for the server to process. This can happen due to several reasons:
The length of the URI increases during the development process as the developer adds more parameters or segments to the URI.
The website experiences redirect loops - causing the URL to be repeatedly appended with additional segments and making it excessively long.
The website is being targeted by attackers who attempt to exploit vulnerabilities or cause a denial of service by sending extremely long URIs.
415 Unsupported Media Type
It arises when the client submits data or a file in a format that is not supported or recognized by the server such as an unsupported image or document format.
416 Range Not Satisfiable
The 416 error occurs when a client sends a request for a specific portion of a resource, but the server is unable to fulfil the request because the specified range is either invalid or unavailable.
This is mostly encountered when a client uses the "Range" header in the HTTP request to retrieve a specific byte range of a file or resource but the requested range is outside the bounds of the available data.
417 Expectation Failed
It happens when the client sets specific expectations in the "Expect" header that the server is either incapable of or unwilling to fulfil.
422 Unprocessable Entity
If a server is able to understand a client's request but is unable to process it due to issues with the request's content or format - 422 occurs.
Some possible causes include:
The submitted data contains values that do not meet the server's validation requirements such as a date in the wrong format or a string that is too long.
The request conflicts with the server's existing data or the server's expected state.
There are issues in the server-side code or database table.
425 Too Early
When you see the 425 Too Early error, it means the server determines it's too soon to handle your request because there is a potential for a replay attack.
Replay attacks are a kind of cyberattack where the attacker records a legitimate request, resends it or modifies it in an effort to take advantage of the system by submitting it again.
426 Upgrade Required
When a server determines that the client's protocol is not acceptable and requires an upgrade in order to process the request - a 426 error occurs.
This error usually occurs when a client sends a request using an outdated or less secure version of a protocol like HTTP/1.1 or HTTPS but the server is expecting a newer or more secure version.
In addition to returning a 426 Upgrade Required error, a server responding to one of these errors should include an "Upgrade" header specifying the protocol that the client will need to use going forward.
428 Precondition Required
It occurs when a server requires a conditional request to be sent by the client but the client's request is missing the necessary conditions in the header section.
Conditional requests are used to specify certain conditions or criteria that must be met before the server processes the request.
A common example is using the "If-Match" or "If-None-Match" headers which specify that the server should only perform the requested action if the specified conditions regarding the resource's state are met.
429 Too Many Requests
When a client sends a server too many requests in a short amount of time - the server becomes overloaded and is unable to handle more requests which results in the 429 error.
It may also include a "Retry-After" header in the response. This header indicates the amount of time the client should wait before sending another request.
Servers often impose rate limits to prevent abuse and ensure fair usage of resources among all clients.
431 Request Header Fields Too Large
When the size of the request header fields sent by a client exceeds the server's limits - a 431 error occurs.
Common causes for this error include lengthy referrer URLs or an excessive number of cookies.
451 Unavailable For Legal Reasons
The 451 Unavailable for Legal Reasons error occurs when a requested resource is restricted due to legal reasons such as government censorship, copyright infringement or court orders.
In these situations, the website owner or a relevant authority has chosen to block access to the resource to comply with the law or a legal ruling.
How to fix them?
To fix various client-side errors, it is essential to address the specific issue causing the error. Below are some general actions you can take to resolve them:
Ensure that you have entered the correct URL, username or password to avoid errors resulting from mistyped information.
Deleting cookies and cache can help the website run more smoothly.
Try accessing other pages on the same website or pages on different websites to determine if the error is limited to specific pages or if it is an issue with your browser.
Make sure that the server is configured correctly.
If you are experiencing a serious issue and none of the above strategies are working - consider reaching out to the website's support team or administrator for assistance.
How can it affect SEO?
Broken links can indeed have a negative impact on a website as they can affect the user experience and may cause visitors to leave the site. It is essential to identify, fix or remove broken links to maintain a high-quality website.
However, it is worth noting that not all 4xx errors have the same impact on indexing.
For example, Error 429 (Too Many Requests) typically does not lead to the removal of the URL by Google as it is a temporary issue that occurs when a server receives too many requests in a short period.
To minimize the impact of 4xx errors on your website's SEO performance, it is essential to regularly monitor your site for broken links and other issues and address these errors promptly.
The bottom line
The 4xx status codes indicate client-side errors when a server processes a request and there are several types of them.
These errors can impact the user experience and SEO but they can be fixed by updating the sitemap, using redirection and appropriate server configuration.