506 - Variant Also Negotiates
HTTP 506 Variant Also Negotiates means transparent content negotiation is misconfigured and selected variants are themselves negotiable.
Last reviewed: February 7, 2026|Source-backed guidance under our editorial policy
Start Here
Use the closest compare guide, playbook, or adjacent error page to narrow the decision faster before you start changing production systems.
This page is part of the Error Reference library. Learn more about the project or report a correction.
What Does Variant Also Negotiates Mean?
Content negotiation configuration is internally inconsistent, causing variant selection to recurse into another negotiable variant instead of a final representation.
Common Causes
- -Negotiation module selects variant that is itself negotiable, creating recursive variant resolution loop.
- -Apache MultiViews mapping points language variant back to negotiable handler and re-enters negotiation stage.
- -Custom Alternates header lists only negotiable resources, so server detects circular negotiation dependency.
How to Fix Variant Also Negotiates
- 1Inspect variant mapping and ensure each negotiable resource resolves to a concrete non-negotiable representation.
- 2Remove circular or self-referential variant definitions from negotiation metadata.
- 3Retest negotiation with explicit
Acceptvariants to verify deterministic representation selection.
Step-by-Step Diagnosis for Variant Also Negotiates
- 1Capture negotiation trace showing how selected variant points back to negotiable resource.
- 2Inspect
Alternates/variant metadata for recursive or cyclic resolution paths. - 3Verify deployment changes to variant maps and transparent negotiation modules.
- 4Retest with targeted variant requests and confirm chosen representation is terminal.
Variant Graph Integrity Analysis
- -Build variant dependency graph and detect cycles (example:
index.enmaps toindexwhich negotiates back toindex.en). - -Verify each variant target is a concrete representation (example: variant entry points to negotiable script endpoint instead of static resource).
Negotiation Rule and Deployment Drift Checks
- -Compare current rule set against last known-good release (example: recent config change introduced recursive fallback chain).
- -Audit edge/origin negotiation engine parity (example: CDN variant map differs from origin map, causing only edge 506 responses).
Implementation Examples
curl -i -X GET https://api.example.com/v1/resource
# Response:
# HTTP/1.1 506 Variant Also Negotiates
# {"error":"Variant Also Negotiates","code":"506"}const response = await fetch('https://api.example.com/v1/resource', {
method: 'GET',
headers: { 'Accept': 'application/json' }
});
if (response.status === 506) {
console.error('Handle 506 Variant Also Negotiates');
}import requests
response = requests.get(
'https://api.example.com/v1/resource',
headers={'Accept': 'application/json'}
)
if response.status_code == 506:
print('Handle 506 Variant Also Negotiates')Seen in Production
Variant config deployment introduces recursive fallback
Frequency: common
Example: New language fallback points to negotiable parent resource, causing variant recursion and 506.
Fix: Correct fallback target to terminal representation and run negotiation graph validation before release.
Edge negotiation map diverges from origin
Frequency: rare
Example: CDN variant metadata update lags behind origin and resolves to recursive variant chain only at edge.
Fix: Synchronize edge/origin variant publishing and gate rollout on parity checks.
Debugging Tools
- -Variant map graph inspection tools
- -Negotiation trace logs (
Acceptto chosen variant) - -Config diff and rollout history
- -Cycle-detection validation in CI
How to Verify the Fix
- -Repeat requests across supported
Acceptvariants and confirm 506 no longer appears. - -Validate each negotiable resource resolves to a single concrete representation path.
- -Monitor negotiation error metrics for recurrence after configuration rollout.
How to Prevent Recurrence
- -Add static validation that rejects recursive variant references in build/deploy pipelines.
- -Version and test negotiation maps with representative language/media combinations.
- -Roll out negotiation config changes with canary validation before full deployment.
Pro Tip
- -model variant mappings as a directed acyclic graph and run cycle detection in CI to prevent 506 regressions entirely.
Official References
Provider Context
This guidance is specific to HTTP services. Always validate implementation details against official provider documentation before deploying to production.