HTTP 421 Misdirected Request indicates that the server received a request that was directed to the wrong origin or virtual host. This status code is commonly associated with HTTP/2 and HTTP/3 connections where multiple domains share the same connection.
Host headersA 421 response tells the client that the request should be retried on a different connection. The server intentionally rejects the request to avoid security or routing issues.
// Example of a 421 response sent by a server
HTTP/2 421
content-type: text/plain
Misdirected Request
// Node.js Express example sending a 421 status
res.status(421).send("Misdirected Request");
The browser or client receives a 421 response and understands that the request was sent to the wrong server endpoint. Modern clients may automatically retry the request using a new connection.
Change the host and click send to see what happens.
Host headers in requests