HTTP 421 — Misdirected Request

The request was directed at a server that is not able to produce a response

When to use it

Use status 421 when this is the correct HTTP response semantic: The request was directed at a server that is not able to produce a response

Request and response example

GET /protected-resource HTTP/1.1
Host: api.example.com

HTTP/1.1 421 Misdirected Request
Content-Type: application/json

{"error":"Request cannot be completed"}

Related status codes

400, 401, 402, 403

References

MDN · RFC 9110