5xx Server Errors

HTTP 506 Variant Also Negotiates

The server has an internal configuration error in transparent content negotiation.

When is 506 used?

  • Content negotiation loop detection

How to handle a 506 response

The problem is on the server side. Check server and proxy logs, retry idempotent requests with exponential backoff, and alert on sustained 5xx rates.

Check the status code a URL returns from the command line:

curl -s -o /dev/null -w "%{http_code}\n" https://example.com

How to return 506 from your server

Node.js (Express)

res.status(506).json({ message: 'Variant Also Negotiates' });

Python (Flask)

return {"message": "Variant Also Negotiates"}, 506

Go (net/http)

w.WriteHeader(506)

Frequently Asked Questions

What does HTTP 506 mean?

506 Variant Also Negotiates: The server has an internal configuration error in transparent content negotiation.

Is 506 an error?

Yes. 506 is in the 5xx Server Errors class. Server errors: the server failed to fulfil an apparently valid request.