# 506 Variant Also Negotiates

> https://http-status.org/docs/506

**Family:** 5xx Server Error

## Rationale

Transparent content negotiation is misconfigured and produced a circular variant reference.

## In Plain Terms

The server got confused while picking the best version of a resource and ended up pointing in circles.

## Description

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

## Server Perspective

### Usage
- Return 506 only for transparent content negotiation configuration errors
- Use it when the server cannot deliver a concrete representation because variant metadata is self-referential
- Transparent content negotiation is enabled and the selected variant is also negotiable
- Server configuration creates a circular variant selection path
- Negotiated representations cannot be resolved because the variant map is self-referential

### Implementation
- Fix the variant map, rewrite rules, or negotiated-resource metadata so each negotiable resource resolves to concrete variants
- Log which variant selection path caused the loop so operators can repair the configuration quickly

### Common Headers
- No status-specific header is required; standard negotiation headers may still appear, but the main fix is server-side configuration

### Body
- A body is helpful; explain that content negotiation configuration is invalid and include a request or trace ID for support

### Pitfalls
- Do not use 506 for ordinary Accept or Accept-Language mismatches; that is usually 406 Not Acceptable
- Do not blame the client for a server-side negotiation loop
- The client asked for an unavailable representation and the server can describe acceptable alternatives (use 406 Not Acceptable)
- The server hit a generic unexpected fault unrelated to negotiation configuration (use 500 Internal Server Error)
- Multiple valid variants exist and the server wants the client to choose (use 300 Multiple Choices)

## Client Perspective

### Pitfalls
- Do not treat 506 like a temporary overload problem
- Do not assume changing authentication or unrelated payload fields will help

## Examples

### Misconfigured negotiated variant

The server's negotiated French variant points to another negotiable resource instead of a concrete representation.

**Request:**
```
GET https://api.example.test/manual
```

**Response:**
```
506 Variant Also Negotiates
Content-Type: application/json

{
  "error": "variant_also_negotiates"
}
```

## Related Codes

- [300 Multiple Choices](/docs/300.md)
- [406 Not Acceptable](/docs/406.md)
- [500 Internal Server Error](/docs/500.md)

