421 Misdirected Request
The 421 HTTP status code is used by the server to inform the client that the request was received but was misdirected to the wrong server.
You can Check Your URLs HTTP Code for FREE
Introduction
In Action
Sample
Conclusion
Introduction
The HTTP status code 421 “Misdirected Request” is used by the server to inform the client that the request was received but was misdirected to the wrong server. This typically occurs in HTTP/2 environments where multiple servers are involved.
By default, the response can be cached, but if specific caching behavior is required, the server must include the appropriate HTTP caching headers in the response.
In Action
When you encounter the 421 Misdirected Request error, it means the server cannot handle the request at that moment. This can happen when the server prefers clients not to reuse connections or when an alternative service is selected.
If you face this error, you can try resubmitting the request using a different connection. Note that proxies will not generate this status. Also, search engines like Google will not index URLs with this status code.
Sample
In the example, when the client sends a request to the server, the server realizes that the request was not meant for it. As a result, it returns the 421 Misdirected Request error to indicate that it cannot fulfill the request.
This can happen when there is a mix-up in the server configuration or if the request is meant for another server altogether.
Request
GET /tech-news HTTP/2
Host: www.example.com
Response
HTTP/2 421 Misdirected Request
Conclusion
The 421 Misdirected Request status code is used when the server receives a request that was not intended for it, indicating a communication issue or misconfiguration. This code helps ensure that clients can retry their requests on the correct server or connection to resolve the issue.