HTTP

HTTP 421 Misdirected Request vs 521 Web Server Is Down

HTTP 421 (Misdirected Request) is a 4xx Client Error response, while 521 (Web Server Is Down) is a 5xx Server Error response. 421 indicates that the request was directed at a server that is unable to produce a response for the combination of scheme and authority in the URI. In contrast, 521 means that cloudflare-specific. The origin server refused the connection.

Description

The request was directed at a server that is unable to produce a response for the combination of scheme and authority in the URI.

When You See It

With HTTP/2 when a connection is reused for a domain the certificate doesn't cover.

How to Fix

Retry the request on a new connection.

Description

Cloudflare-specific. The origin server refused the connection.

When You See It

When Cloudflare can't establish a TCP connection to the origin server.

How to Fix

Check that the origin server is running and the firewall allows Cloudflare IPs.

Key Differences

1.

421 is a 4xx Client Error response, while 521 is a 5xx Server Error response.

2.

HTTP 421: The request was directed at a server that is unable to produce a response for the combination of scheme and authority in the URI.

3.

HTTP 521: Cloudflare-specific. The origin server refused the connection.

4.

You encounter 421 when with HTTP/2 when a connection is reused for a domain the certificate doesn't cover.

5.

You encounter 521 when when Cloudflare can't establish a TCP connection to the origin server.

When to Use Which

For 421 (Misdirected Request): Retry the request on a new connection. For 521 (Web Server Is Down): Check that the origin server is running and the firewall allows Cloudflare IPs.

Learn More