At One Place

HTTP 421 — Misdirected Request

HTTP 421
Misdirected Request
The request arrived at a server that is not configured to answer for that hostname.

What 421 actually means

An HTTP/2 artefact. Browsers reuse one connection for several hostnames when the certificate covers them all, which is normally a performance win — but if the server behind that connection is not actually configured for the host being requested, it answers 421 to say "wrong door, open a new connection". Clients are expected to retry on a fresh connection, so a working setup will recover invisibly; a persistent 421 means the origin genuinely has no virtual host for that name.

Common causes

  • HTTP/2 connection coalescing sending a request for host B down a connection opened for host A
  • A wildcard or multi-domain certificate covering hostnames the origin does not serve
  • A load balancer routing a request to a backend with no matching virtual host
  • A missing or misconfigured `server_name` / `ServerName` entry

If you're just trying to view the page

  1. Reload the page — the browser usually retries on a new connection and succeeds
  2. Try a private window or another browser to rule out a coalesced connection being reused
  3. If it persists on one site only, it is a server configuration problem there

If it's your site

  1. Make sure every hostname on a shared certificate has a matching virtual host on every origin that certificate is served from
  2. Add an explicit default server block that returns 421 or 404 rather than silently serving the wrong site
  3. Watch for this after adding a SAN to a certificate but not the corresponding vhost

Reference

Status code
421
Reason phrase
Misdirected Request
Category
4xx — Client Error
Defined in
RFC 9110 §15.5.20

Common questions

What does HTTP 421 mean?
The request arrived at a server that is not configured to answer for that hostname. An HTTP/2 artefact. Browsers reuse one connection for several hostnames when the certificate covers them all, which is normally a performance win — but if the server behind that connection is not actually configured for the host being requested, it answers 421 to say "wrong door, open a new connection".
How do I fix a 421 error?
Reload the page — the browser usually retries on a new connection and succeeds
Is 421 a client error or a server error?
421 is in the 4xx range, which means client error. The request itself was the problem, so retrying it unchanged will usually return the same code.

Related pages

Sources

  1. Hypertext Transfer Protocol (HTTP) Status Code Registry — IANA
  2. RFC 9110: HTTP Semantics — IETF

How these figures are compiled and checked