More
More
421 Misdirected Request
The request reached a server that cannot answer for this domain.
- Code
421- Reason phrase
- Misdirected Request
- Class
- 4xx Client error
- Defined in
- RFC 9110 section 15.5.20
- Cacheable by default
- No
What it means
Client error: the problem lies with the request. Repeating it unchanged will normally fail again.
Common causes. HTTP/2 connection reuse across domains that share an address but not a certificate, or a CDN routing problem.
What to do. Retry on a new connection. Site owners should check that the certificate and server names match.
How clients and crawlers treat it
Google Search. Like every 4xx except 429, it tells Google the content does not exist: an indexed URL is removed from the index, and a new one is not processed. Crawl frequency for the URL gradually drops. Source: Google Search Central, How HTTP status codes, and network and DNS errors affect Google Search.
Caching. Not cacheable by default (RFC 9110 section 15.1 does not list it). A cache stores it only when the response says so with Cache-Control or Expires.
Example response
HTTP/1.1 421 Misdirected Request Content-Type: text/plain; charset=utf-8 Misdirected Request
How to send 421
location /example {
return 421;
}
RewriteEngine On RewriteRule ^example$ - [R=421,L]
http_response_code(421); echo 'Misdirected Request'; exit;
res.writeHead(421, { 'Content-Type': 'text/plain' });
res.end('Misdirected Request');
# in a view function return 'Misdirected Request', 421
Change the paths to suit. In nginx, add_header needs always to apply to error responses.
Related codes
- 422Unprocessable ContentThe request is well formed but its data fails validation.
- 423LockedA WebDAV resource is locked.
- 418I'm a teapotAn April Fools' joke from RFC 2324: a teapot refusing to brew coffee. It is reserved, not a real status.
- 424Failed DependencyA WebDAV action failed because another action it depended on failed.
All status codes · All 4xx codes
Names and numbers from the IANA HTTP Status Code Registry. Google Search behaviour as documented by Google Search Central.