HTTP 308 Permanent Redirect vs 506 Variant Also Negotiates
HTTP 308 (Permanent Redirect) is a 3xx Redirection response, while 506 (Variant Also Negotiates) is a 5xx Server Error response. 308 indicates that the resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed. In contrast, 506 means that the server has an internal configuration error: the chosen variant resource is configured to engage in content negotiation itself.
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 server has an internal configuration error: the chosen variant resource is configured to engage in content negotiation itself.
When You See It
Rare. Indicates a misconfigured server-side content negotiation loop.
How to Fix
Fix the server's content negotiation configuration.
Key Differences
308 is a 3xx Redirection response, while 506 is a 5xx Server Error response.
HTTP 308: The resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed.
HTTP 506: The server has an internal configuration error: the chosen variant resource is configured to engage in content negotiation itself.
You encounter 308 when for permanent URL changes where POST requests must remain POST.
You encounter 506 when rare. Indicates a misconfigured server-side content negotiation loop.
When to Use Which
For 308 (Permanent Redirect): Update all references to the new URL. The HTTP method is preserved. For 506 (Variant Also Negotiates): Fix the server's content negotiation configuration.