506 Variant Also Negotiates

HTTP Status CodesServer (5xx)rarerStatus Code: 506Last updated: todayTested on:Google ChromeNode.js v20 LTSJune 2026

The server has an internal configuration error in content negotiation.

506 Variant Also Negotiates Quick Fix⏱️ Est. Fix Time: 3 minutes

Usually happens because:

  • Circular configuration references where variant

🔍 Quick Checklist:

Meaning

The HTTP 506 Variant Also Negotiates server error status code indicates that the server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper negotiation endpoint.

Root Causes

  • Circular configuration references where variant resources refer to content negotiation loops.
CauseFrequency
Circular configuration references where variant⭐⭐⭐⭐⭐

Common Mistakes

  • Configuring content negotiation indices to reference other index files recursively.

How to Fix

1Verify transparent content negotiation configurations on the server.
2Ensure variant resources resolve to static files rather than another content negotiation block.

Framework-Specific Examples

Express router returning 506.

Express Example
app.get('/negotiate', (req, res) => {
  res.status(506).send('Content negotiation loop detected.');
});

Server Configuration Examples

Nginx ignores status 506.

Nginx Config
# Handled by upstream application

Prevention

  • Map all content variations (e.g. languages) to explicit, terminal resource paths.

Frequently Asked Questions (FAQ)

Q: What is transparent content negotiation?

It is an HTTP protocol extension (RFC 2295) that allows a server to delegate the selection of format representations to the client, supplying index parameters.

Q: Why does a 506 error occur?

It occurs when a server tries to negotiate a resource format (like language or type), but the chosen variation is configured to negotiate again, creating an infinite loop.

Q: Is 506 cacheable?

No. 506 Variant Also Negotiates responses are never cached.

Q: Is 506 widely used?

No. Transparent content negotiation is rarely implemented in modern web APIs; most web apps use custom routing parameters instead.

Still having this problem?

Didn't solve your problem?

SuggestRequest Error