Skip to content

How to Fix the 406 Not Acceptable Error in 5 Checks

Flat document icon with a blocked badge beside the title How to Fix the 406 Not Acceptable Error

A 406 Not Acceptable error means the server cannot send a response in the format your request asked for. The fix depends on where the mismatch sits, and the usual places are a content negotiation rule, a security rule or a plugin.

I reproduced the error on Apache 2.4.67 in October 2026 and checked how WordPress 7.1.3 behaves with the same request. The test shows exactly which header triggers a 406, which most guides only describe in general terms.

This guide explains what the error means, what causes it and how to fix it in five checks. You also get the test results, a short list for visitors and a way to prevent it on your own site.

What Is the 406 Not Acceptable Error?

The 406 Not Acceptable error is an HTTP status code that a server returns when it cannot produce a response matching the request’s content preferences. A browser or app states those preferences in headers, and the server refuses when it has nothing that fits and will not guess.

The MDN reference for 406 says the server could not produce a response matching the values in the proactive content negotiation headers. It lists three of them: Accept, Accept-Encoding and Accept-Language.

Browsers fill in these headers for you. A visitor never types them. Scripts, API clients and tools such as curl can set them by hand. That is why a script can trigger a 406 on a page that opens fine in a browser.

Think of Accept as a shopping list. A request that says Accept: image/png asks for a PNG. If the server only holds HTML and JSON versions of that page, it has nothing on the list to hand over.

You may see the error written as HTTP error 406, error 406 or 406 error. They all mean the same thing. The page usually reads “Not Acceptable”, sometimes with a line that says an appropriate representation could not be found.

MDN adds a useful note for site owners. A server may return a default response instead, and in many cases a 200 with a default page is friendlier than a 406. That choice sits with whoever configures the server.

What Causes HTTP Error 406?

HTTP error 406 happens when a request asks for a format, language or encoding that the server will not provide. It also happens when a security rule blocks the request. The cause is rarely the visitor and almost always sits in server settings, a plugin or a firewall rule.

Here are the causes I found in vendor guides and in my own test:

  • A content negotiation mismatch: The request asks for a type the server cannot produce, which is the case MDN describes.
  • Security rules: Kinsta’s 406 guide says specific security settings or rules can block content and trigger the error.
  • A plugin or theme conflict: The same guide says a plugin, theme or third-party extension may be the reason on WordPress.
  • Language or compression headers: Kinsta also lists mismatches with the Accept-Language and Accept-Encoding headers.
  • Server configuration limits: SiteGround’s 406 guide lists misconfigured settings or limits on allowed MIME types.

Most of these produce the same plain page. The page alone does not tell you which one you have. The request headers and the server logs do.

The response body gives one clue. Apache’s negotiation error lists the available variants, as my test showed.

A firewall block often shows a short page from your host or security tool. Note the exact wording before you start.

Also note when the error began. If it started right after an update, a new plugin or a server change, you already know where to look first.

How I Reproduced a 406 Not Acceptable Error on Apache

I reproduced a 406 on Apache by turning on content negotiation for one folder and asking for a type the folder could not provide. The same URL returned 200 for three common Accept headers and 406 for image/png. That proves the header, and not the URL, causes the error.

For the test I created a folder with two files, report.html and report.json. I added one line to its .htaccess file, Options +MultiViews, which lets Apache pick a file by the request’s Accept header.

Then I requested /neg/report, with no file extension, using different Accept headers.

curl -i -H "Accept: image/png" http://localhost/neg/report

The results were clear.

Apache 406 test results by Accept header

The 406 response also carried a list of the available variants. The body read “An appropriate representation of the requested resource could not be found on this server”, followed by report.html and report.json with their types. In a browser, the page looked like this.

Apache 406 not acceptable response in the browser

MDN says a 406 body should list the available representations so the user can choose, and Apache did that here. Many other servers return a bare page with no list. Do not count on one.

How to Fix the 406 Not Acceptable Error

To fix the 406 Not Acceptable error on your own site, work through five checks in order. Check the URL, the request headers, the server rules, your plugins and the logs. Start with the cheapest check, and stop as soon as the page loads again.

Most 406 errors end at the second or third check.

Five checks to fix a 406 Not Acceptable error

Step 1: Check the URL and Try Another Browser

Retype the address and reload, because a typo can send a request to a rule that rejects it. Then open the page in a private window or a second browser. If it loads there, a browser extension or a saved setting is changing the request headers.

This is the only check a visitor can do. If the error stays, the problem is on the site, and the owner needs to look at the server.

Step 2: Read the Request Headers

Open your browser’s developer tools, go to the Network tab and reload. Click the failing request and read the Request Headers. The Accept line shows what the browser asked for.

You can also repeat the request from a terminal. This command prints only the response headers:

curl -I -H "Accept: text/html" https://example.com/page/

Change the Accept value and run it again. If one value returns 200 and another returns 406, you have found the header the server rejects.

Step 3: Check .htaccess and Content Negotiation

On Apache, a damaged .htaccess file or a negotiation rule is a common cause. Look for Options +MultiViews or rules that restrict file types. In my test, Options +MultiViews alone produced the 406 for a type the folder could not serve.

Turning MultiViews off has a cost.

When I set Options -MultiViews, the same request to /neg/report returned 404, because no file has that exact name. Only /neg/report.html loaded. Turn it off only if your URLs include file extensions.

Edit the file with a file manager or over FTP. Our guide on using FileZilla shows how to connect and download .htaccess before you change it.

If you suspect the WordPress rules are damaged, open Settings > Permalinks and click Save Changes. In my permalink test, that single click rebuilt a deleted .htaccess file.

Step 4: Disable Plugins and Themes

Deactivate your plugins from the Plugins screen and then reload the failing page. If it loads, turn them back on one at a time until the error returns. Kinsta says a plugin, theme or third-party extension may cause a 406 on WordPress.

If you cannot reach the dashboard, rename the plugins folder over FTP. WordPress then treats every plugin as inactive. Rename it back afterward.

Switch to a default theme next. If the error disappears, your theme or its child theme holds a rule that changes how requests are handled.

Step 5: Check Security Rules and Server Logs

Security tools such as a web application firewall can reject requests that look unusual. Kinsta says that specific security settings or rules can block content from the server. Check your firewall plugin’s log and your host’s security panel for a blocked request at the time of the error.

Then read the server error log. The line next to your failing request often names the rule that fired. Send that line to your host if you cannot read the rule yourself.

If your host runs ModSecurity or a similar rule engine, ask them to confirm whether a rule matched your request. They can usually allow a safe request or adjust the rule.

After any server change, such as moving hosts or renewing a certificate, test your main pages. Our guide on renewing your SSL certificate is a good reminder to check the site afterward.

Does WordPress Cause the 406 Error?

WordPress core did not cause a 406 error in my tests, because it served the page for every Accept header I tried. A WordPress page requested with Accept: image/png returned 200. The REST API returned 200 for Accept: application/xml too.

That result points the search toward the server layer. A 406 on a WordPress site usually comes from Apache negotiation, a firewall rule, a security plugin or a host-level rule. The CMS itself is a less likely source.

The WordPress side can still matter. A plugin can send its own response code, and a security plugin can block a request with 406. That is why the plugin test is worth the five minutes it takes.

Do not assume the whole site is affected. Test the home page, a post and an image file. A 406 that hits only one kind of request points to a rule for that kind, such as uploads or forms.

If the error appears only on one URL, look at what that URL does. A form handler, a download link or a custom API route is more likely to have its own rules than a normal post.

How Developers Should Handle Accept Headers

If you build an API or a custom endpoint, you decide what happens when a client asks for an unsupported type. You can return a 406, or you can send a default response. MDN says a default 200 response is sometimes preferable to a 406 when the server’s answer differs from the accept headers.

When you do send a 406, tell the client what is available. MDN says the body should list the available representations. A short JSON message that names the supported types, such as application/json, saves the caller from guessing.

Language headers deserve a thought too. A request with Accept-Language: fr to a site that only has English content can fail on a strict server. Most sites fall back to a default language, which is the friendlier choice.

Choose one rule and apply it everywhere. An API that returns 406 on one route and a default response on another confuses every client developer who uses it.

Test your own clients too. A script that sends Accept: application/xml to an endpoint that only returns JSON will fail with a 406 on a strict server. Match the header to what the endpoint supports, or remove it.

How to Prevent the 406 Not Acceptable Error

You prevent a 406 error by keeping server rules simple, testing API clients and checking your site after every change. Most 406 errors come from a rule someone added and then forgot. A short routine catches them before your visitors do.

  • Keep a copy of .htaccess: Download it before every edit so you can roll back in seconds.
  • Test API clients: If an app calls your site, confirm it sends an Accept header your server can answer.
  • Review firewall rules: Check logs after you change a rule, and allow trusted requests.
  • Update on a schedule: Update plugins one at a time and test after each.
  • Set a sensible default: When you control the server, return a default response instead of a 406 where it makes sense.

Document your fixes. A one-line note such as “turned off MultiViews in /neg/ on 8 October” helps the next person who sees the error. That person is often you, six months later.

Back up the site before you change server files. A WordPress care plan covers backups and update checks. A bad rule never takes the site down for long.

If errors like this keep returning, a one-time review of your server rules and plugins can save hours. Our WordPress maintenance services include that check.

406 vs Other 4xx Errors

The 406 error is one of several client errors in the 400 range, and each one means something different. A 400 says the request was malformed, a 403 says access is refused and a 404 says nothing matches. A 406 says something matches but not in the format asked for.

Mixing them up wastes time. A 404 sends you to check the URL and the file, while a 406 sends you to check the headers and the negotiation rules.

A 403 is a third case. The server understands the request and refuses it, often because of permissions or a firewall. A 403 sends you to check access rules, and a 400 sends you to check the request syntax.

When the problem is the request body format and not the Accept header, read how to fix the HTTP 415 error in WordPress.

Keep this table in mind when you read a log.

CodeMeaningFirst check
400The request is malformedRequest syntax
403Access is refusedPermissions and firewall
404Nothing matches the URLURL and files
406Nothing matches the format asked forAccept headers and negotiation rules

My own test shows the difference. With MultiViews on, the request for a PNG returned 406 because files existed but none were PNG. With MultiViews off, the same request returned 404 because no file matched the name.

Conclusion

You now know how to fix the 406 Not Acceptable error. Check the URL, read the request headers, check .htaccess, test plugins and read the logs, in that order.

Remember what my test showed. The same URL returned 200 for three Accept headers and 406 for one. The header is the clue.

If the error is on a WordPress site, look at the server and security layers first. WordPress core ignored the Accept header in my test. It is rarely the cause.

Frequently Asked Questions (FAQs)

Q1. What does a 406 error mean?

A 406 error means the server cannot send a response in the format the request asked for. The request’s Accept, Accept-Language or Accept-Encoding header lists types the server will not provide. The server refuses instead of sending a default.

Q2. How do I fix HTTP 406 Not Acceptable?

Retype the URL and then read the request headers in your browser’s Network tab. Next check .htaccess, turn off plugins one at a time and read the server logs. If you cannot find the rule, send the log line to your host.

Q3. Is error 406 my fault as a visitor?

Rarely. A visitor can only retype the address or try another browser. If the error stays, the site owner needs to check the server, a firewall rule or a plugin.

Q4. Can a WordPress plugin cause a 406 error?

Yes. Kinsta’s guide says a plugin, theme or third-party extension may be the reason. Deactivate plugins one at a time and reload the failing page.

Q5. Does a 406 error hurt SEO?

It can if it appears on pages you want search engines to read. Check your key URLs with a curl request, and fix any that return an error code.

Q6. What is the difference between 406 and 404?

A 404 means nothing matches the URL. A 406 means something matches, but not in the format asked for. In my Apache test, the same request returned 406 with MultiViews on and 404 with it off.

Yash Kapoor
Yash Kapoor

Yash Kapoor is the founder and WordPress expert at DevDiggers, where he builds WordPress and WooCommerce plugins for loyalty programs, point-of-sale systems, digital wallets and affiliate management. He writes about developer tools, site performance and the technical side of running a WordPress store. He draws on years of building and maintaining production plugin codebases.

Leave a Reply

Your email address will not be published. Required fields are marked *