MockFoxAdvertise

HTTP 421 Misdirected Request

Updated Free mock REST & WebSocket APIs

HTTP 421 Misdirected Request — The request reached a server that isn't configured to answer for that host and scheme.

Class
4xx Client Error
Defined in
RFC 9110 §15.5.20
Official
Yes (IANA registry)
Cacheable by default
No (unless Cache-Control/Expires say so)
Safe to retry
Not without changing the request

Try it: get a real 421 response

Our test endpoint answers every request with 421 Misdirected Request.

curl -i https://mockfox.dev/api/status/421

Use it in tests, health-check monitors or to see how your client handles a 421. Add ?delay=2000 to slow it down.

What does HTTP 421 mean?

Happens with HTTP/2 connection reuse: browsers reuse one TLS connection for several hostnames covered by the same certificate, and if the server behind it can't serve one of them it returns 421 so the browser opens a fresh connection. Persistent 421s usually mean a misconfigured TLS SNI / virtual host setup, e.g. in Apache after changes to SSLStrictSNIVHostCheck.

How to fix 421

  1. Visitors: Reload the page, check the address for typos, and clear the site's cookies. If it persists, the site owner needs to fix it.
  2. Developers: Read the response body and server logs for details, fix the request (method, headers, body, credentials) and return a clear error message to clients.

Example 421 response

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

{"status":421,"error":"Misdirected Request"}

4xx Client Error: The request contains an error or can't be fulfilled — fix the request before retrying. See the full list of HTTP status codes.

Related status codes

Related tools

Frequently asked questions

What does HTTP 421 Misdirected Request mean?

The request reached a server that isn't configured to answer for that host and scheme.

Is 421 a client or a server error?

421 is a 4xx code, so it signals a problem with the request (as seen by the server). Retrying the identical request usually gives the same result.

Where is 421 defined?

In RFC 9110 §15.5.20. It's listed in the IANA HTTP Status Code Registry.

How can I test how my app handles a 421?

Call https://mockfox.dev/api/status/421 — it responds with 421 to any method, with CORS enabled. Add ?delay=2000 to simulate a slow response.