Knowledge Base

How to Fix HTTP Status Code 406 (Not Acceptable)

How to Fix HTTP Status Code 406 (Not Acceptable)


When someone visits your website, their browser sends a request to your server asking for a page.
If the server can’t respond in a format the browser accepts, it returns:

HTTP 406 – Not Acceptable

It’s less common than a 404 error, but it can still stop visitors from accessing your site.
This guide explains what 406 means, what usually causes it, and how to fix it on a typical hosting environment like Thamara Cloud.


What Is Error 406?

406 Not Acceptable means:

  • The browser sends a request with an Accept header (what formats it can handle).

  • The server can’t return the response in any of those formats.

  • So, it responds with a 406 status instead of the page.

In real life, 406 often appears because of:

  • Security filters (WAF / ModSecurity)

  • Conflicts in your CMS (WordPress, Joomla, etc.)

  • Misconfigured plugins, themes, or code


Before You Start: Take a Backup

Before changing anything:

  • Back up your website files and database.

  • Use your hosting control panel (cPanel/Plesk) or a backup tool.

  • This lets you safely test fixes without breaking your live site.


Step 1: Rule Out Simple Client-Side Issues

Start with quick checks:

  1. Open the same URL in:

    • Another browser (Chrome, Firefox, Edge, etc.)

    • Incognito / Private mode

    • Another device (mobile vs desktop)

  2. If the error happens only in one browser:

    • Clear cache and cookies

    • Disable browser extensions

    • Turn off VPN/proxy (if any)

If the error appears everywhere, move on to the website/server side.


Step 2: Check Your CMS (WordPress, etc.)

Most 406 errors on websites come from changes inside the application.

2.1. Undo Recent Changes

Think about what changed just before the error started:

  • Did you update WordPress / your CMS?

  • Install or update a plugin, theme, or extension?

  • Change security/plugin settings?

Try:

  • Rolling back the latest update (if possible)

  • Or temporarily disabling the plugin/theme you suspect

If the 406 disappears → that change caused the issue.

2.2. Disable Plugins / Extensions

If you’re not sure which plugin is the problem:

  1. Disable all non-essential plugins/extensions.

  2. Check the problematic URL again.

  3. If it works:

    • Re-enable plugins one by one

    • Test after each one until the error returns → that plugin is the culprit.

For WordPress, you can do this from:

  • Dashboard → Plugins, or

  • Via File Manager/FTP by renaming the wp-content/plugins folder if you can’t log in.

Step 3: Check for Server-Side Security Rules

On many hosting environments, a 406 is triggered by security rules, for example:

  • Web Application Firewall (WAF)

  • ModSecurity

These tools block:

  • Suspicious requests (e.g., SQL injection–like patterns)

  • Requests containing blocked keywords

  • Certain scripts or “server info” pages

What You Can Do

  1. Note:

    • The exact URL showing 406

    • Time and date

    • What you were doing (opening page, submitting form, etc.)

  2. Check your Error Logs from the control panel:

    • Look for entries mentioning ModSecurity, WAF, or 406 around that time.

  3. If you see security rules being triggered:

    • Contact your hosting support (e.g., Thamara Cloud)

    • Send them:

      • URL(s)

      • Time of error

      • Any log snippet if you have it

    • Ask them to review the security rule and whitelist it if it’s a false positive.

This keeps your site safe while allowing valid traffic.


Step 4: General Best Practices to Avoid 406

To reduce the chance of 406 and similar errors:

  • Use trusted plugins/themes with good reviews

  • Avoid installing unnecessary extensions

  • Keep your CMS, plugins, and themes updated

  • Test big changes on a staging site before applying them to production

  • Enable regular backups so you can roll back quickly

Please rate this article to help us improve our Knowledge Base.

0 0