HTTP 421 Misdirected Request vs 505 HTTP Version Not Supported
HTTP 421 (Misdirected Request) is a 4xx Client Error response, while 505 (HTTP Version Not Supported) is a 5xx Server Error response. 421 indicates that the request was directed at a server that is unable to produce a response for the combination of scheme and authority in the URI. In contrast, 505 means that the server does not support the HTTP version used in the request.
Description
The request was directed at a server that is unable to produce a response for the combination of scheme and authority in the URI.
When You See It
With HTTP/2 when a connection is reused for a domain the certificate doesn't cover.
How to Fix
Retry the request on a new connection.
Description
The server does not support the HTTP version used in the request.
When You See It
When a client uses an HTTP version the server doesn't support.
How to Fix
Use a supported HTTP version (typically HTTP/1.1 or HTTP/2).
Key Differences
421 is a 4xx Client Error response, while 505 is a 5xx Server Error response.
HTTP 421: The request was directed at a server that is unable to produce a response for the combination of scheme and authority in the URI.
HTTP 505: The server does not support the HTTP version used in the request.
You encounter 421 when with HTTP/2 when a connection is reused for a domain the certificate doesn't cover.
You encounter 505 when when a client uses an HTTP version the server doesn't support.
When to Use Which
For 421 (Misdirected Request): Retry the request on a new connection. For 505 (HTTP Version Not Supported): Use a supported HTTP version (typically HTTP/1.1 or HTTP/2).