506 Variant Also Negotiates means: A transparent content-negotiation error (RFC 2295): the chosen variant is itself configured to negotiate, creating a circular reference. The server's negotiation configuration is broken, not the client's request. Server-error 5xx codes mean the server failed while trying to fulfill a valid request. The fault lies with the service or its upstreams, not the caller. Some members are transient and retryable with backoff; others indicate bugs or configuration errors that only the operator can fix. In practice you will meet 506 when a variant map points at a resource that also negotiates; misconfigured transparent content negotiation on an old apache setup; a circular variant selection loop in experimental negotiation code. On the client side, nothing to fix client-side; report the URL to the operator. Retrying will reproduce the same configuration error. On the server side, audit variant maps so selected variants are terminal (non-negotiating); transparent negotiation is largely obsolete — prefer standard proactive negotiation.
When 506 happens
- A variant map points at a resource that also negotiates
- Misconfigured transparent content negotiation on an old Apache setup
- A circular variant selection loop in experimental negotiation code
How to fix it
On the client
Nothing to fix client-side; report the URL to the operator. Retrying will reproduce the same configuration error.
On the server
Audit variant maps so selected variants are terminal (non-negotiating); transparent negotiation is largely obsolete — prefer standard proactive negotiation.
Should you retry?
Operator-side fault; retry idempotent calls with backoff, escalate if persistent.
Debugging steps
When 506 appears unexpectedly, start by capturing the full exchange: 'curl -i' or the browser DevTools Network tab shows the exact status line and response headers, which often carry the real explanation. Determine whether the error came from the edge or the origin: a proxy-generated error page looks different from your app's. Then trace upstream health, timeouts and recent deployments. For this code specifically, check whether the most common trigger applies to your situation: a variant map points at a resource that also negotiates. Compare your exchange against the raw HTTP example above. If you operate the server, correlate the timestamp with application and proxy logs using the request id; if you are the client, verify the request shape against the API documentation before changing anything or retrying.
Notes & gotchas
Transparent content negotiation (RFC 2295) never gained adoption, so 506 survives mainly as a reserved code and an indicator of circular variant-map configuration on legacy systems.
Examples
HTTP/1.1 506 Variant Also Negotiates
Content-Type: application/json
Content-Length: 112
{
"error": "variant_also_negotiates",
"message": "A variant map points at a resource that also negotiates"
} curl -i https://api.example.com/v1/resource # observe the 506 response and its headers const res = await fetch("https://api.example.com/v1/resource");
if (res.status === 506) {
// server-side failure: retry idempotent calls with backoff + jitter,
// surface a friendly error after the retry budget is exhausted
throw new TransientError(await res.text());
} import requests
res = requests.get("https://api.example.com/v1/resource", timeout=10)
if res.status_code == 506:
# server fault: back off and retry idempotent calls;
# log res.headers.get("X-Request-Id") for the operator
res.raise_for_status() Frequently asked questions
Will I ever see 506 in modern systems?
Almost never. RFC 2295 transparent negotiation never gained wide adoption; 506 survives mainly as a reserved code and a configuration-bug indicator.
How is 506 different from 508?
506 is a negotiation circularity (variant also negotiates); 508 is a WebDAV binding loop detected during a Depth: infinity traversal.
Are 5xx errors safe to retry?
Idempotent requests (GET, PUT, DELETE) generally yes, with exponential backoff and jitter. Non-idempotent POSTs need care: a 504 may mean the work completed upstream. Check state or use idempotency keys before retrying.
Who should fix a 5xx — the caller or the provider?
The provider: 5xx asserts a server-side fault. Callers can only retry politely (backoff, idempotency) and report correlation ids; persistent 5xx need operator action on logs, upstreams or configuration.
Try the JSON Validator
Check JSON syntax and locate errors by line and column.