Skip to main content
HTTP/4xx (Client Error)

421 Misdirected Request

The request was directed at a server that is not able to produce a response for this scheme and authority.

❓ Why does this happen?

HTTP/2 connection coalescing reused a TLS connection for a hostname the server's certificate or vhost does not serve.

✅ How to fix it

Ensure each hostname has a matching TLS certificate and server block, or disable HTTP/2 coalescing for mismatched hosts.

Return or handle 421 in your stack

// app/api/resource/route.ts
export function GET() {
  return Response.json(
    { error: "Misdirected Request", status: 421 },
    {
      status: 421
    }
  );
}

Live 421 mock endpoint

Point your app, tests, or retry logic at this free public URL to reproduce a real 421 response (CORS enabled, optional ?delay=ms up to 5000).

https://castov.com/api/mock/421

Frequently Asked Questions

What does HTTP Status 421 mean?
The request was directed at a server that is not able to produce a response for this scheme and authority.
Why am I getting a 421 status code?
HTTP/2 connection coalescing reused a TLS connection for a hostname the server's certificate or vhost does not serve.
How do I fix a 421 Misdirected Request error?
Ensure each hostname has a matching TLS certificate and server block, or disable HTTP/2 coalescing for mismatched hosts.
How can I test how my app handles a 421 response?
Send a request to https://castov.com/api/mock/421 — it returns a real 421 Misdirected Request response with CORS enabled. Add ?delay=2000 to simulate a slow server.

Other 4xx status codes

Browse the full HTTP status codes directory or troubleshoot terminal errors in the Error Fix Encyclopedia.