HTTP 506 Variant Also Negotiates
HTTP 506 Variant Also Negotiates signals a server-side misconfiguration in transparent content negotiation (TCN). The server selected a variant resource to serve in response to the client's Accept headers, but that variant is itself configured to perform content negotiation — creating a circular dependency the server cannot resolve.
506 is defined in RFC 2295 as an experimental status code for the Transparent Content Negotiation protocol. It is one of the rarest HTTP status codes in production use, appearing almost exclusively in Apache-based setups using mod_negotiation with type-map files.
Quick reference
| Code | 506 |
|---|---|
| Name | Variant Also Negotiates |
| Category | 5xx Server Errors |
| Specification | RFC 2295 §8.1 |
| IANA status | Assigned (Experimental) |
| Cacheable | No |
| Client action | None available — this is a server configuration error. Contact the server operator. |
| In-depth guide | HTTP 506 troubleshooting guide → |
What it means: transparent content negotiation
HTTP content negotiation is the mechanism by which a server selects the best representation of a resource based on the client's preferences, expressed through request headers like Accept, Accept-Language, and Accept-Encoding. Most modern systems implement this at the application layer — your API code or framework inspects the headers and selects the appropriate response format.
Transparent Content Negotiation (TCN), defined in RFC 2295, is an older, server-driven model where the server itself selects variants using type-map files. In Apache's mod_negotiation, a file like document.var lists available representations (e.g., document.en.html, document.fr.html) and the server picks the best match based on the client's Accept-Language header.
506 occurs when the server selects a variant and then discovers that the variant resource is also configured as a negotiable endpoint — meaning it also tries to negotiate its content rather than serving a concrete response. This circular condition cannot be resolved, so the server returns 506 rather than entering an infinite negotiation loop.
Common causes
Variant file incorrectly marked as negotiable
In an Apache type-map file (.var file), each variant entry points to a specific file and declares its content type and language. If a variant file itself has a TCN: choice or Alternates header — or is itself another type-map — the server detects the circular dependency and returns 506. The fix is to ensure all variant files are concrete, non-negotiable documents with no TCN headers.
Misconfigured MultiViews with recursive file naming
Apache's MultiViews option enables automatic content negotiation by scanning the directory for files matching the base name plus any extension. If a file in the directory has an extension pattern that causes Apache to treat it as a negotiable resource rather than a concrete variant, MultiViews can produce a 506. Audit the directory for unexpected file extensions or naming conflicts.
Content negotiation configuration applied to variant files themselves
If your Apache configuration applies global negotiation options (via Options +MultiViews in a directory-level .htaccess) to directories containing variant files, those variant files may also become negotiable. Restrict negotiation options to the parent directory only, not the variant file locations.
Legacy migration leaving TCN headers in responses
Sites migrated from older Apache setups to new servers sometimes carry over type-map files or .htaccess configurations that reference TCN. If the new server's file layout differs from the original, variant paths may resolve incorrectly, producing circular negotiation. Review any migrated .var files and .htaccess content negotiation directives.
How to diagnose and fix HTTP 506
- Identify the URL triggering 506. Enable Apache's
LogLevel debugand inspect the error log for the specific file path Apache is trying to serve. - Inspect the type-map file. Open the
.varfile and verify that each variant entry points to a concrete file (e.g.,page.en.html) rather than another type-map or negotiable resource. - Check variant files for TCN headers. The variant files themselves should not contain
TCN,Alternates, orVaryresponse headers that would make them appear as negotiable. - Review
.htaccessscope. EnsureOptions MultiViewsis not applied to the variant file directory. UseOptions -MultiViewsexplicitly in the variant directory if needed. - Test without TCN. As a quick diagnostic, temporarily rename or remove the
.varfile and serve a concrete file directly. If the 506 disappears, the type-map is the source of the problem. - Consider moving to application-level negotiation. If TCN is not a hard requirement, implement content negotiation in application code using the
Acceptheader. This gives more control and avoids the complexity of Apache's file-based negotiation.
506 vs related server errors
| Code | Meaning | Typical cause |
|---|---|---|
| 506 | Variant Also Negotiates | Circular content negotiation loop in TCN configuration |
| 300 | Multiple Choices | Server offers multiple variants but client must choose (not TCN) |
| 500 | Internal Server Error | Generic unhandled server exception |
| 508 | Loop Detected | Infinite loop detected during WebDAV request processing |
| 406 | Not Acceptable | Server cannot produce a variant matching client's Accept headers |
FAQ
What does HTTP 506 mean?
HTTP 506 means the server has a misconfigured transparent content negotiation setup. The server selected a variant resource to serve, but that variant is itself configured to negotiate — creating a loop that the server refuses to enter. It is always a server configuration error.
When does HTTP 506 occur?
Almost exclusively in Apache servers using the mod_negotiation module with .var type-map files or MultiViews. It is extremely rare in modern web development because transparent content negotiation has been largely replaced by application-level negotiation.
How do I fix HTTP 506?
Inspect your Apache .var type-map file. Ensure variant entries point to concrete files with no TCN headers. Verify Options MultiViews is not applied to the variant file directory. As a longer-term fix, consider replacing TCN with application-level content negotiation for more reliable control.
Is HTTP 506 common?
No — it is one of the rarest HTTP status codes in production. If you are encountering it, you are working with Apache's transparent content negotiation feature, which is uncommon in applications built after the early 2000s.
Related resources
On this site: HTTP 506 troubleshooting guide · HTTP 406 Not Acceptable · HTTP 300 Multiple Choices · HTTP 508 Loop Detected · HTTP 500 Internal Server Error · All 5xx server errors
Standards: RFC 2295 §8.1 · IANA HTTP Status Code Registry · MDN Web Docs: 506