Ошибка 421 misdirected request

BNAME.RU » Код ошибки HTTP 421 Misdirected Request

Что означает ошибка 421 Misdirected Request ?

Запрос был отправлен на сервер, который не смог ответить. Это может быть отправлено сервером, который не настроен на создание ответов для комбинации схем и разрешений, включенных в URI запроса. Клиенты, принимающие неверно направленный ответ на запрос от сервера 421, могут повторить запрос — независимо от того, является ли метод запроса идемпотентным или нет — через другое соединение. Это возможно, если соединение повторяется или выбрана альтернативная услуга ALT-SVC. Этот код состояния НЕ ДОЛЖЕН создаваться прокси-серверами. Ответ 421 кэшируется по умолчанию, то есть, если не указано иное в определении метода или явном управлении кэш2.

When a single SSL certificate is shared by multiple websites, the browser triggers the error 421 misdirected request. It happens due to the conflicts in the virtual host entry.

At Bobcares, we help our customers to fix similar SSL errors as part of our Server Management Services.

Today, let’s get into the details on how to fix this error.

What causes ‘421 misdirected request’ error?

When a single TLS certificate is shared across many domains, the certificate either has a wildcard name, such as ‘*.example.org’ or carries several alternate names. Browsers using HTTP/2 recognizes that and reuse an already opened connection for such hosts.

But when there are multiple requests for multiple hosts on the same TLS connection, renegotiation becomes impossible.  It may then trigger the error “421 Misdirected Request”, to the client.

421 misdirected request fix

Let’s detail on how we help the customer to fix this problem.

How to fix ‘421 misdirected request’?

The common methods that can be used to fix the issue invlude:

  • Using Separate SSL for each domain
  • Disabling HTTPS redirection
  • Clearing browser cache

Using Separate SSL for each domain

As indicated earlier, usage of a single SSL certificate within multiple domains commonly triggers the misdirected request error. This commonly happens when HTTP/2 tries to reuse the connection request.

Thus to fix this error, the reuse of connection by HTTP/2 should be stopped. Using separate SSL for each domain will help to avoid reusing the connection by HTTP/2.

Another method is to move each domain to a different IP address. This will also help to avoid the reuse of connection requests.

Disabling the https redirection code

As this error happens after enabling SSL over multiple domains with the same certificate, the cost-effective fix in this situation would be to disable the http:// to https:// redirection. However, this is not a recommended solution.

But in case if some of the domains sharing the certificate are more like personal sites and do not contain any sensitive information, not everyone would like to purchase a separate certificate for it. In such cases, to make the website back online, a stop on the http:// to https:// redirection will help.

Clearing the browser cache

At times, it could be a simple browser cache. It is possible for the browsers to cache the 421 response.  Thus it is not a bad idea to try clearing the browser cache.

[Still having the problem with 421 misdirected request fix?- We’re available 24/7.]

Conclusion

In short, conflicts in the virtual host entry triggers the 421 misdirected request when the server shares a single SSL certificate within multiple domains. Today, we saw how our Support Engineers fix this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Are you trying to access a website only to be met with the HTTP 421 Misdirected Request error? Don’t worry, you aren’t alone. This is one of the most common errors that can occur when accessing websites and it happens for many reasons. In this article, we will provide an overview of what this error is and how you can fix it.

The HTTP 421 Misdirected Request error indicates that the request sent by your browser was blocked because there was something wrong in the way it was made. It could be down to anything from server configuration issues or network problems on either end, but whatever the cause, understanding why it happened is key to resolving it quickly and reliably.

Regardless of whether you’re a web developer looking to troubleshoot client requests or just someone wanting access to a website, knowing how to diagnose and resolve HTTP 421 Misdirected Requests should make life easier.

What Is 421 Http Status Code?

The 421 HTTP status code is an error response of Hypertext Transfer Protocol (HTTP) used when a client requests a request method that the server cannot produce responses to. It indicates that the connection reuse or redirection of a different IP address has been misdirected and failed. In other words, it means that the website server will not accept your web request using the same connection with which you have sent it.

It can be caused by several factors such as changes in network configurations or incorrect entries in domain name system records, but most commonly arises due to mismatching URLs between the user’s browser and the web server they are trying to access. Additionally, this problem also occurs if there is an issue with redirections from one site to another.

Cause Of 421 Http Status Code Error

A 421 Misdirected Request error is an HTTP status code that indicates a connection request was rejected by the server. This type of error occurs most often when there are multiple domains attempting to connect via a single SSL certificate. An SSL certificate is used to authenticate and secure methods, such as HTTPS or FTPS, so if one domain uses the same certificate for two different connections requests, this can trigger a misdirected request error.

Since the cause of a 421 Misdirected Request Error is typically related to the use of an SSL Certificate, it’s important to verify whether you’re using a valid certificate with all necessary parameters in place. If your website requires more than one domain name then each must have its own unique set of certificates assigned to it; otherwise, you may be at risk of receiving errors similar to this one.

In other words, if you’ve received a misdirected request error on your site it could indicate that either your connection requests are being denied due to incorrect authentication credentials or your hosting provider has failed to assign distinct certificates for each domain associated with your site.

Server Side Or Client Side Issue?

When it comes to determining whether a 421 HTTP status code error is due to a server side or client side issue, there are several factors that you need to have a look. Whether the request URI has explicit cache controls set and whether multiple requests have been sent from several domains for the same resource can all affect how the status codes will be generated.

There are also cases where a single URL may generate multiple responses with different status codes when trying to access the desired resource. In these situations, it’s important to determine if there is any specific reason why this is happening – such as incorrect headers or an invalid request method.

In order to properly diagnose and troubleshoot any issues related to http status codes, it’s essential to understand both server-side and client-side components involved with generating them. This includes examining the response uri, header data, requesting methods, caching policies and other relevant parameters associated with each request made by the user’s browser.

How To Fix 421 Http Status Code Error

When clients receive a ‘421 HTTP Status’ error, it is typically due to misconfiguration of the server. It occurs when there are separate SSL certificates for different domains and search engines try to connect with one domain but use another certificate. This may result in an IP address mismatch which won’t produce a response. To fix this issue, webmasters must ensure that all requests from search engines have the correct SSL certificate installed and that the same IP address is used across multiple domains.

Therefore, if you have separate SSL certificates for each of your domains, make sure that they are properly configured so as not to cause any misunderstandings between the client and server. Additionally, verify that the IP address is consistent across all domains so that search engines can retrieve the information correctly without producing errors like 421 HTTP status codes.

This error can be extremely disruptive because it prevents search engine crawlers from indexing content on websites correctly, resulting in poor ranking in search results. Fixing this issue should be a priority for webmasters who want their pages to appear higher up on SERPs (Search Engine Result Pages). Without addressing the root cause of these issues, sites will continue to suffer from poor optimization and visibility online.

Impact Of The 421 Error On The Optimization Of A Site

The impact of the 421 error on the optimization of a site can be severe. When sent by a server, this type of response code indicates that it is unable to produce an alternative service for the combination included in the request. This means that any search engine attempting to crawl your website will not be able to complete its task and may retry the request later. As such, failing to fix this issue could result in reduced visibility and rankings – something no website owner wants if they are looking to optimize their online presence.

It’s important then that webmasters take steps towards resolving HTTP 421 errors as soon as possible. By doing so, you’ll have more control over how your website appears and ranks on search engines, allowing you to maximize potential traffic and conversions generated from organic sources.

Similar Http Status Codes To 421

There are a few other HTTP status codes similar to the 421 error that can impact site optimization. Each of these codes has its own unique set of implications and it’s important for website owners to understand how they work.

First, there is the 401 Unauthorized Error, which occurs when a user does not have permission to access a particular page or resource on a website. This usually happens due to an incorrect username or password being entered into the system. It’s important for webmasters to ensure that their authentication processes are secure in order to prevent this type of error from occurring.

Next up is 403 Forbidden Error, which indicates that although the user has proper credentials, they do not have permission to view the requested content. This could be because the server administrator has explicitly blocked certain users from accessing specific pages or files on their websites. To resolve this issue, it may be necessary to speak with the server administrator directly so they can grant you access if appropriate.

The 404 Not Found Error is also very common and refers to a situation where there isn’t any existing webpage at all located at the URL given by the client – either due to an incorrect address being provided or simply because no such page exists in the first place! In order for your visitors not experience this kind of problem, make sure all links on your site are valid and up-to-date. Additionally, always provide visitor friendly custom 404 Page Not Found messages if needed.

Lastly, we come back full circle with another 5xx series error code: The 502 Bad Gateway response code signifies that something went wrong while trying to process requests between two servers within a network connection – most commonly seen when using reverse proxies like Cloudflare. If you encounter this issue frequently then it might require further investigation as it could be indicative of some underlying issues with your application architecture or hosting environment setup.

All HTTP status codes by categories

The server returns the HTTP response status code 421 Misdirected Request to indicate that it has received a request that was not intended for it. This status code was introduced in HTTP/2. By default, the response is cacheable, but the server can override this behavior by including the appropriate HTTP caching headers.

USE CASE

When the client receives the 421 Misdirected Request error message, it means that the server is unable to fulfill the request. This can occur in situations involving connection reuse, where the server does not want clients to reuse connections. In response, the client can attempt to submit the request over a different connection. Another scenario where this error may arise is when an alternative service (Alt-Svc) is selected. It’s important to note that this status code is not generated by proxies.

Example

In the provided example, the client requests a resource, but the server responds with the 421 Misdirected Request error message because the server was not the intended recipient of the request.

Server Request

                

GET /news HTTP/2
Host: example.seomeetup.com

Server Response

                

HTTP/2 421 Misdirected Request

Code References

Angular

                

@angular/common/http/HttpStatusCode.MisdirectedRequest

Apache HttpComponents

                

org.apache.hc.core5.http.HttpStatus.SC_MISDIRECTED_REQUEST

Python

                

http.HTTPStatus.MISDIRECTED_REQUEST

Symfony

                

Response::HTTP_MISDIRECTED_REQUEST

Go

                

http.StatusMisdirectedRequest

Rails

                

:misdirected_request

Rust

                

http::StatusCode::MISDIRECTED_REQUEST

.NET

                

HttpStatusCode.MisdirectedRequest

From The Same Category

  • 400 Bad Request
  • 401 Unauthorized
  • 402 Payment Required
  • 403 Forbidden
  • 404 Not Found
  • 405 Method Not Allowed
  • 406 Not Acceptable
  • 407 Proxy Authentication Required
  • 408 Request Timeout
  • 409 Conflict
  • 410 Gone
  • 411 Length Required
  • 412 Precondition Failed
  • 413 Payload Too Large
  • 414 URI Too Long
  • 415 Unsupported Media Type
  • 416 Range Not Satisfiable
  • 417 Expectation Failed
  • 418 I’m a Teapot
  • 419 Page Expired
  • 420 Method Failure or Enhance Your Calm
  • 422 Unprocessable Entity
  • 423 Locked
  • 424 Failed Dependency
  • 425 Too Early
  • 426 Upgrade Required
  • 428 Precondition Required
  • 429 Too Many Requests
  • 430 HTTP Status Code
  • 431 Request Header Fields Too Large
  • 440 Login Time-Out
  • 444 No Response
  • 449 Retry With
  • 450 Blocked by Windows Parental Controls
  • 451 Unavailable For Legal Reasons
  • 460 Client Closed Connection Prematurely
  • 463 Too Many Forwarded IP Addresses
  • 464 Incompatible Protocol
  • 494 Request Header Too Large
  • 495 SSL Certificate Error
  • 496 SSL Certificate Required
  • 497 HTTP Request Sent to HTTPS Port
  • 498 Invalid Token
  • 499 Token Required or Client Closed Request

Join SEO Meetup and Learn Online Marketing

*All fields are mandatory

The request was directed at a server that is not able to produce a response. This can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URI.

Clients receiving a 421 Misdirected Request response from a server MAY retry the request — whether the request method is idempotent or not — over a different connection. This is possible if a connection is reused1 or if an alternative service is selected ALT-SVC.

This status code MUST NOT be generated by proxies.

A 421 response is cacheable by default, i.e., unless otherwise indicated by the method definition or explicit cache controls2.


  • 1 Connection Reuse RFC7540 Section 9.1.1
  • 2 Calculating Heuristic Freshness RFC7234 Section 4.2.2
  • Source: RFC7540 Section 9.1.2

421 CODE REFERENCES

Rails HTTP Status Symbol :misdirected_request

.NET HttpStatusCode.MisdirectedRequest

Rust http::StatusCode::MISDIRECTED_REQUEST

Go http.StatusMisdirectedRequest

Symfony Response::HTTP_MISDIRECTED_REQUEST

Python3.5+ http.HTTPStatus.MISDIRECTED_REQUEST

Apache HttpComponents Core org.apache.hc.core5.http.HttpStatus.SC_MISDIRECTED_REQUEST

Angular @angular/common/http/HttpStatusCode.MisdirectedRequest

How to troubleshoot a 421 status code

If you encounter a 421 status code, it is recommended to check the documentation or seek support from the application or server vendor for more information about the specific cause of the status code. In addition, you can try the following general troubleshooting steps:

  • Check the server logs: Look for any errors or warnings in the server logs that may provide more information about the cause of the status code.
  • Verify network connectivity: Ensure that there are no network connectivity issues between the client and server that may be causing the status code.
  • Verify credentials: If the 421 status code is related to authentication, verify that the client is using the correct credentials to access the resource.
  • Check server configuration: Review the server configuration to ensure that it is set up correctly and that all necessary dependencies are installed and configured.
  • Check for updates: Make sure that the application or server is running the latest version and that any necessary updates or patches have been applied.

Additional resources

  • Learn about web development
  • Learn about SEO
  • Web development services from WebFX
  • SEO services from WebFX
  • MDN Web Docs
  • W3Schools

Return to List of HTTP Status Codes

Понравилась статья? Поделить с друзьями:

Интересное по теме:

  • Ошибка 4201 ауди
  • Ошибка 4201 вольво
  • Ошибка 4201 kyocera 2040
  • Ошибка 42 yamaha jog
  • Ошибка 4201 vag

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии