506 Server Error 📋

506 Variant Also Negotiates: A Circular Content Negotiation

Last updated: June 28, 2026 • 4 min read

✦ The Golden Answer: The 506 Variant Also Negotiates status code indicates a server configuration error in transparent content negotiation (RFC 2295). It occurs when the resource has a variant that itself points back to the same resource, creating a circular reference. The server cannot resolve which representation to serve, so it returns 506. This is a rare error, usually caused by misconfigured .htaccess, mod_negotiation, or other content negotiation directives that create infinite loops.

What Is Transparent Content Negotiation?

Transparent content negotiation is a mechanism where the server selects the best representation of a resource based on client headers (e.g., Accept-Language, Accept-Encoding). The server can offer multiple variants (e.g., different languages, formats) and chooses the most appropriate one. If the negotiation rules create a loop (variant A points to variant B, which points back to variant A), the server cannot decide and returns 506.

Common Causes of 506 Errors

CauseExampleHow to Fix
Circular variant referencesVariant A says "choose variant B" and variant B says "choose variant A".Break the loop by explicitly defining the variants without mutual references.
Misconfigured .htaccessApache Multiviews or RewriteRule that redirects to itself.Check rewrite rules and negotiation settings; ensure they don't create loops.
Content negotiation module errorsmod_negotiation misconfiguration.Simplify negotiation rules or disable transparent negotiation if not needed.
Proxy or CDN interferenceA proxy adds headers that trigger a loop.Check proxy settings; ensure they don't modify negotiation headers.

Example: 506 Response

HTTP/1.1 506 Variant Also Negotiates Content-Type: text/html <html> <body> <h1>506 Variant Also Negotiates</h1> <p>The server encountered a circular reference in content negotiation.</p> </body> </html>

How to Fix 506 Errors

  • Check Apache configuration: If you're using Apache's Multiviews or RewriteRule, look for loops. Simplify the negotiation rules.
  • Disable transparent negotiation: If you don't need it, turn it off. In Apache, you can remove Options +MultiViews or set MultiviewsMatch Any carefully.
  • Use explicit redirects: Instead of relying on negotiation, use explicit 301/302 redirects to the correct variant.
  • Check for proxy loops: If you have a reverse proxy, ensure it doesn't add headers that cause the server to renegotiate infinitely.

Preventing 506 Errors

  • Test negotiation rules thoroughly – simulate requests with different headers to ensure no loops.
  • Monitor logs – watch for negotiation errors in server logs.
  • Simplify configuration – avoid complex negotiation hierarchies.

Frequently Asked Questions

Is 506 a client error or a server error?

It's a server error (5xx) because the server's configuration is faulty. The client's request is valid, but the server cannot process it due to its own misconfiguration.

Can I see 506 in the wild?

Very rarely. It mostly occurs in poorly configured Apache servers with mod_negotiation enabled. Most modern sites avoid transparent negotiation in favor of explicit redirects or server-side language detection.

What is the difference between 506 and 500?

506 is a specific error for negotiation loops. 500 is a generic catch-all for any other internal error.