4xx Response Codes – Errors

4xx Response Codes – Errors
4xx Response Codes – Errors

This response category is the most problematic and important to examine. Status codes 400-499 indicate client-initiated problems. These problems can range from client-initiated requests, to incorrect node name, request wait time, uncontrolled request, malicious request, and others.

Each digit of the three-digit number demonstrates the problem at different levels. For an example, let’s look at the most popular 404 error:

  • “4” at the beginning is a pointer to the side of the error (in this case, the user);
  • “0” in the middle is an indication of a syntax problem;
  • “4” at the end is an indication that no destination node was found.

List and overview of 4xx response codes

The 4xx category consists of the following set of responses:

  • 400
  • 401
  • 402
  • 403
  • 404
  • 405
  • 406
  • 407
  • 408
  • 409
  • 410
  • 411
  • 412
  • 413
  • 414
  • 415
  • 416
  • 417
  • 418
  • 419
  • 422
  • 423
  • 424
  • 425
  • 426
  • 428
  • 429
  • 431
  • 444
  • 449
  • 450
  • 451
  • 499

Let’s look at each one in more detail below.

400 Bad Request

If the server responds with a 400 error, it means that it did not understand the request. This may be due to incorrect syntax of the request or an invalid URL. That is why sometimes the HTTP 400 error code is used as a general error status for all error statuses, even if the problem occurs on the server side.

How to fix error 400

This is a common error and there can be many reasons for its occurrence. To correct it, we recommend that you do the following:

  • make sure you have the latest version of .NET Framework installed;
  • try disabling your antivirus and try again;
  • turn off Windows Firewall;
  • update drivers;
  • Check your device for viruses.

401 Unauthorized

The 401 status code indicates that pre-authorization was rejected due to invalid user data provided in the request.

It occurs when the user sends a request with incorrect authorization data (for example, incorrect login and password). The problem will be solved after successful authorization by the user. In this case, there are practically no “pitfalls” and if standard authorization does not help, you just need to contact the site administration.

402 Payment Required

The request cannot be fulfilled until the customer has made a payment. This code is rarely used in web development nowadays.

When is it used? In Apple MobileMe, a 402 error was displayed when there was a possible abuse of the user’s account resources. Also, the YouTube video hosting service uses this status if a certain IP address sends an excessive number of requests, requiring the user to enter a CAPTCHA.

403 Forbidden

The user is trying to access a web resource to which he does not have rights, and authorization is useless here.

This status code is used when the server understands the request, but does not allow it to be executed due to the client’s access restrictions to this section. This usually happens when the web resource is not intended for public access. Most often, it is set by administrators in order to restrict the average site visitor from various service files inside the CMS or to restrict blocked users.

404 Not Found

The most popular error on the Internet among ordinary users. It means that the page you are looking for has either been deleted or the request was entered incorrectly. In some cases, with typical errors in requests, 301 is sometimes set up for the supposed correct page.

Causes of 404 errors

  • the page address or link is incorrect. This problem is typical only for manual input;
  • old page address. This is possible if the site owner forgot to set up a redirect to a new page;
  • if the redirect was not composed correctly, then instead of the final page the user will see a page with a 404 error;
  • In rare cases, the cause may be problems on the server.

How 404 Error Affects a website

At first glance, everything is very simple: the page does not exist, and therefore the search engine will not pay attention to such elements, but the error has the greatest impact on the level of user experience: the most common problem associated with 404 is the incorrect design of the page that should display the error text. Many website owners do not bother to create a full-fledged design for the 404 error page and, as a result, when going to a non-existent page, the user simply sees a white screen with a barely noticeable line of text. It goes without saying that such a page will confuse an inexperienced user and force them to leave the site, generating low time on site and viewing depth rates.

How to find 404 error pages

Finding pages with 404 is not difficult. For these purposes, you can use the following options:

  • Google Search Console;
  • website parsers, such as Screaming Frog;
  • Plugins for CMS.

How to Customize a 404 Error Page

The answer depends on the reason for the error. Let’s consider 2 main options:

  1. a) if the error display is configured deliberately, then it is absolutely necessary to create a visually understandable page design so that the user immediately understands that he has landed on a non-existent page and returns to the previous page, rather than leaving the site;
  2. b) if the error occurs due to incorrect redirection, the redirect should be corrected.

405 Method Not Allowed

This response is best described by its name. A request from the server was received, but the method used could not be applied. In other words, an error occurs when attempting to use a GET-formatted method when input is required via POST (or using the PUT method for read-only web documents).

405 errors are related to specific elements of the page that the server accesses. For example, if part of a script’s request differs from the request of the user who is supposed to use that script.

406 Not Acceptable

The requested resource is only capable of creating content that does not match the Accept headers of the request. The browser can pass to the server parameters of data that will be accepted from the server.

This status code can be applied when the file format of the requested resource does not correspond to a format that can be recognized by the user. Here we are talking primarily about the programming language, not the language of communication.

407 Proxy Authentication Required

Like the 401 status code, the 407 status code indicates that the client must first authenticate with the proxy server. To complete this authentication process, the proxy server must return a Proxy-authenticate header that meets the requirements set by the server.

This status code appears in situations where the server considers the data request from the client to be correct, but access to the web resource is possible only after authentication through the proxy server.

408 Request Timeout

The main feature of this error is that it can occur even without an initial request. If such a response occurs, it means that the server intends to disconnect an unused connection (current). Simply put, the user simply did not receive a full request for a certain period of time.

This type of error has been around since some browsers started using http pre-connection to load content faster. It is important to remember that many servers will drop the connection without even notifying you, so you should not always expect this response.

409 Conflict

The 409 status code indicates a situation where the request cannot be fulfilled due to inconsistencies in accessing the web document. A user may encounter this code when attempting to upload a file to a web server where a newer version of the file already exists, causing a conflict between versions in the management system.

410 Gone

The server returns such a response if the resource was previously available at a specific URL, but has been removed and is currently unavailable. The user is advised not to repeat the same request multiple times.

This status is used when the resource cannot be accessed via the given request, and the server does not have data about the hypothetical new location of the resource. If the server believes that the web document can be restored in the near future, then it is better for the client to return the code 404.

411 Length Required

For this resource, the client must specify Content-Length in the request header. Without this field, there is no need to repeat the request to the server at this URI. This response is typical for POST and PUT requests. For example, if files are downloaded at the specified URI, and the server has a limit on their size. In this case, it is more appropriate to check the Content-Length header right at the beginning and refuse the download, than to create an unnecessary load by breaking the connection when the client actually sends too large a message.

412 Precondition Failed

The server did not match one of the conditions specified by the sender in the request. In other words, one or more request headers were returned with a value of false.

This code is applied when a request header that makes a valid request to a resource indicates that this particular request is not applicable to that resource.

413 Request Entity Too Large

The 413 status code appears when the server rejects a request because the request body is too large.

It can be used when sending a POST request with data that is larger than the server can process.

414 Request URL Too Long

The URL is too long, causing the server to be unable to process the request. This rare problem can occur, for example, when a client attempts to pass long parameters via the GET method instead of POST, when a circular redirect occurs (for example, if the URI prefix points to the end of itself), or when the server is attacked by a client that attempts to exploit vulnerabilities in servers with limited buffer length for reading or processing the Request-URI.

415 Unsupported Media Type

The 415 status code is returned to indicate that the server encountered part of the request made in a format that is not supported.

This code appears when the request does not specify any supported media types for the resource or the server. For example, the user requests an image in a format that is not supported by the web server. The server understands what was requested, but does not understand the format in which the resource was requested.

416 Requested Range Not Satisfiable

The request specified a Range header field, but none of the values ​​specified matched the size of the resource being requested, and there was no If-Range header field. This is especially important for requests that require a range of bytes where the first byte in the specified range is larger than the actual size of the resource.

417 Expectation Failed

The server is unable to process the “Expect” field present in the request. It is also possible that a timeout occurred when accessing the server via a proxy server, which also results in a 417 error. Compared to 408, 417 explicitly states that a proxy server is being used.

418-420 I’m a teapot

The HTTP status code 418 was originally created as an April Fool’s joke, sometimes used to add a humorous element, but is not really intended for serious everyday purposes. This code has no official status, and therefore most browsers ignore it.

422 Unprocessable Entity

HTTP Error 422 occurs when a request has been successfully delivered to the server and processed, but a logical error has been detected in the XML document content that prevents the required WebDAV operation from being performed. This can happen, for example, if the data being transmitted does not match the expected format or contains errors.

423 Locked

The user or their account is prohibited from accessing the specified platform. This may be due to invalid credentials, expired credentials, incorrect credentials, or restrictions set by the system administrator.

424 Failed Dependency

The current request depends on another process completing successfully. If the dependent operation fails, it may result in the current request failing, causing the server to return the code shown.

425 Unordered Collection

The HTTP request from the client is made via the HTTPS protocol. It can take a significant amount of time to establish a connection between the client and the server. This becomes a vulnerability because it forces the server to send a retry request to the client until the secure connection is fully established.

426 Upgrade Required

A new protocol must be used to send requests to the server. The error occurs when the client continues to use an outdated version of the HTTP protocol, while the server requires a more modern version.

428 Precondition Required

The origin server requires preconditions to be specified when accessing. This code is intended to prevent resource version conflicts in cases where a client gets (GETs) the resource state, modifies it, and sends (PUTs) it back to the server, while a third party also modifies the resource directly on the server, causing a conflict. By requesting preconditions, the server effectively guarantees that the current version of the resource will be used by clients. If these guarantees are not met, the user is returned a 428 error.

429 Too Many Requests

This response is sent when the client has made too many requests in a short period of time. When is this status code used? When the user sends too many requests in a short period of time.

431 Request Header Fields Too Large

Status code 431 indicates that the server is refusing to process the request because the headers are too large. The request can be retried after the headers are reduced in size.

This code can be used either when the total size of the headers is too large, or when one of the headers is too large. In the latter case, the response should indicate which header was too large.

444 No Response

This code is used in Nginx server logs to indicate situations where the server closes the connection without sending data back to the user. Typically used in the context of malware protection. Nginx is a powerful web server, often used as a proxy and reverse server. It is economical in its use of resources and supports a large number of simultaneous connections.

449 Retry With

A Microsoft status code that indicates that a request should be repeated after a specific action has been completed. When might this code be used? It is typically generated when the parameters of a request do not match what the server is able to verify.

450 Blocked by Windows Parental Controls – Microsoft

Microsoft extension. This situation occurs when Windows parental control settings prohibit access to certain web documents. It is used when parents (knowing about this function) use parental control, and the user (id-access) requests access to a blocked resource.

451 Unavailable For Legal Reasons

The server refuses to provide the requested content: This may be due to government censorship of certain content, copyright infringement, or content that is contrary to laws or court orders.

499 Client Closed Request

The 499 status code is an error that occurs in the Nginx web server. It occurs when the client closes the connection before the server has time to respond. This status code can be called “non-standard” because the HTTP code 499 is not a recognized standard like 404, 400, or 500. It is primarily associated with Nginx servers.

To summarize

Understanding 4xx response codes on the server is essential for the proper operation of web applications. These codes indicate errors on the client side, such as an invalid request or lack of authorization. Understanding the causes of 4xx errors helps improve the user experience, ensuring more efficient interaction with web resources. Knowing how to fix and prevent such errors will help ensure smooth operation of applications and improve user experience.

Olha Tyshchenko
Editor
commercial offer

    SEO promotionCopywritingSMM promotionDevelopmentContextual advertisingDesign
    Digital новини в нашому телеграм-каналі
    Інтернет-маркетинг
    простою мовою
    subscribe
    Other articles by the author
    04/07/2023
    The first hundred and then a thousand followers is a special number for every blogger. This is a sign that the content has passed the quality test with a small number of subscribers, but the process has begun to bear fruit. Before we look at how to gain followers on Instagram, let's pay attention to what you need them for.

    07/05/2024
    Conversion necessarily brings benefits to the website owner, so it must be constantly monitored and adjusted to see the best results of its work.

    23/08/2023
    Content marketing is a special method of product promotion aimed at increasing customer confidence. It differs from classical advertising in that it introduces customers to a product without imposing it, but only offering useful material. Consumers like it when a product description is close to reality and gives clear advice on how to use it.

    Latest articles by #Technical SEO
    04/12/2024
    SEO text is one of the tools used for effective SEO promotion of websites on the Web. Thanks to the creation and publication of such optimized texts on the resource, the pages become more relevant and gradually raise the site to the top of the search results.

    20/09/2024
    Content is the king of modern marketing, and its role in online business development is hard to overestimate. It includes not only textual materials, but also photos, videos, and other visual elements that together create a comprehensive image of your business.

    12/09/2024
    Today, User Experience (UX), which means “user experience” in English, is a very common phenomenon that is relevant when developing any new product for the Internet. UX specialists are mostly found in design, but UX copywriting is also developing rapidly.

    WhatsApp Telegram Viber Почати розмову