HTTPError.net

The fastest way to diagnose, understand, and fix any HTTP status code

506 Variant Also Negotiates

Fault: Server
TL;DR

Transparent content negotiation is misconfigured so a chosen variant is itself a negotiable resource, causing a circular reference.

The server has an internal configuration error in content negotiation.

What HTTP 506 Variant Also Negotiates Means

The server has an internal configuration error in content negotiation.

Transparent content negotiation is misconfigured so a chosen variant is itself a negotiable resource, causing a circular reference.

Common Causes

How to Fix It (For Visitors)

How to Fix It (For Developers/Admins)

Returning a 506 Variant Also Negotiates (Code Examples)

If you build APIs or web apps, here is how to send an HTTP 506 response and how to test for it:

Node.js (Express)

app.get('/resource', (req, res) => {
  res.status(506).json({ error: 'Variant Also Negotiates' });
});

Python (Flask)

@app.route('/resource')
def resource():
    return jsonify(error='Variant Also Negotiates'), 506

PHP

<?php
http_response_code(506);
header('Content-Type: application/json');
echo json_encode(['error' => 'Variant Also Negotiates']);

Check the status with curl

curl -I https://example.com/resource
# Look for: HTTP/1.1 506 Variant Also Negotiates

Frequently Asked Questions

What does HTTP 506 Variant Also Negotiates mean?

Transparent content negotiation is misconfigured so a chosen variant is itself a negotiable resource, causing a circular reference. In short: The server has an internal configuration error in content negotiation.

Is a 506 Variant Also Negotiates error my fault or the website's?

506 is a 5xx server-error code, so the problem is on the server side, not your browser or device. As a visitor you can usually only retry; if you run the site, investigate the server.

How do I fix a 506 Variant Also Negotiates error?

Review content-negotiation configuration. Ensure variants are concrete resources, not negotiable ones. Disable MultiViews if not needed.

Official Specification

The 506 Variant Also Negotiates status code is defined in RFC 2295.

View the IANA HTTP Status Code Registry →