Technical SEO

4xx Status Code

Shahid Maqbool

By Shahid Maqbool
On May 4, 2023

4xx Status Code

While exploring the internet, you must have seen the terms of a server and client. A server is a computer or a program that brings the required details to the client/user. This client can be another system or a web browser that requests specific information from the server.

HTTP (hypertext transfer protocol) is the way for both the client and server to communicate. This is based on requests (from the client) and responses (from the server).

If there is an error in this process, you will see a three-digit response that is a status code. Below is complete detail on 4xx status codes that are very commonly discussed in the digital world.

What is a 4xx Status Code?

4xx status codes are used to indicate errors that occur on the client's side. These status codes help inform the user about the specific type of error that has occurred.

When the server receives an incorrect or problematic request from the client, it will respond with a 4xx status code. The client needs to fix their request to resolve the issue and receive a successful response from the server.

Types of 4xx Status Code

All the errors - from 400 to 499 - have particular meanings. This helps in troubleshooting the problem. We will discuss the most common ones only.

400 Bad Request

This error can occur when the request is incorrect due to URL syntax mistakes. Also, this error can result from corrupted cookies, or invalid request headers can cause the same problem.

How do you identify it? Well, this may give you a message in the following ways:

  • 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.

401 Unauthorised

You may encounter this error when the credentials are not valid or authenticated. The common reasons can be those of a “400 error”. Also, it can be a result of an incorrect username or password.

You can have the following messages:

  • Unauthorised

  • Access denied

402 Payment Required

The 402 status code was 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. There isn't a universally agreed-upon standard for its use.

This status code is still reserved for potential future implementation in digital payment systems that may arise within the HTTP response code framework.

As an example, a retail website might utilize the 402 to notify a user about specific issues such as a problem with their card or other payment methods.

403 Forbidden

As the name shows, you are forbidden to access a particular website even if there is no credential problem. It can be a cause of either the website owner protecting their website from hackers or they have made a mistake while setting permissions.

The error may display messages like:

  • Forbidden

  • 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 a 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.

409 Conflict

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.

410 Gone

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:

  • Request line

  • Headers

  • Message body

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.

What Does the ‘4xx Page’ Error Mean in the Sitemap?

XML sitemap of your website will tell the search engine about all the URLs available on your website. If certain URLs show a 4xx client error, it means your site requires a technical audit.

What is The Cause of It?

It can be because you may have deleted or moved some web pages and have not updated the sitemap.

What Impact Can It Have?

It can mislead the search engine and make it crawl certain pages. What does that mean? That means search engines will waste crawl budget visiting pages that don't exist.

It may also affect the indexing of the pages you want search engines to discover. This way, the search engine will not go according to your sitemap instructions.

How to Fix This Issue?

You need to update the sitemap by deleting the URLs of the pages you have removed.

Also, you must use redirection for those pages that are shifted. Furthermore, you should include the new URLs and change their status to “200 OK”, which shows a successful response.

How Can it Affect SEO? 

Broken links can negatively impact the website since they affect user experience. It is critical to remove and amend the problems.

Generally, 4xx status codes affect indexing because they indicate that the URLs are absent, and eventually, the search engines may remove them.

However, it is worth noting that not all 4xx errors have the same impact.

For example, Error 429 (Too Many Requests) typically does not lead to the removal of the URL. It is a temporary issue that occurs when a server receives too many requests in a short period.

If you really want to minimize the impact, you must regularly monitor your site and look for broken links. If they exist, you must address the issue promptly.

The Bottom Line

SEOs and people working in the digital space commonly face 4xx errors. 4xx status codes represent errors occurring on the client’s side.

When a server processes a request, it requires the correct information coming from the client. In case of trouble with the request from the client, the server will send a 4xx status code to let the user know what kind of error has occurred.

That error means a specific page or a website cannot be reached at that moment. The reason? It can be due to the unavailability of a page or show that the request may have bad syntax.

Whatever the reason, it frustrates users. So, to provide a good user experience to visitors, you must do everything possible to avoid these errors. Because they not only result in bad UX but also hurt your SEO.

Related Articles

Leave a reply
All Replies (0)