HTTP

HTTP 308 Permanent Redirect vs 421 Misdirected Request

HTTP 308 (Permanent Redirect) is a 3xx Redirection response, while 421 (Misdirected Request) is a 4xx Client Error response. 308 indicates that the resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed. In contrast, 421 means 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.

Description

The resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed.

When You See It

For permanent URL changes where POST requests must remain POST.

How to Fix

Update all references to the new URL. The HTTP method is preserved.

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.

Key Differences

1.

308 is a 3xx Redirection response, while 421 is a 4xx Client Error response.

2.

HTTP 308: The resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed.

3.

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.

4.

You encounter 308 when for permanent URL changes where POST requests must remain POST.

5.

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

When to Use Which

For 308 (Permanent Redirect): Update all references to the new URL. The HTTP method is preserved. For 421 (Misdirected Request): Retry the request on a new connection.

Learn More