
You try to save a post or submit a form and get 406 Not Acceptable — often with a ModSecurity warning attached. The 406 Not Acceptable error fix has two faces: the textbook meaning (content negotiation failed — the server cannot return a format your client accepts) and the far more common real-world meaning on shared hosting (ModSecurity’s firewall blocked your request as suspicious). This 2026 guide covers both, starting with the one you almost certainly have.
On cPanel shared hosting, 406 is ModSecurity’s signature. ModSecurity inspects incoming requests against the OWASP rule set, and when a request looks like an attack — or merely trips an over-strict rule — it answers 406. Publishing a WordPress post with certain HTML, submitting a form with “suspicious” characters, or even saving a page can trigger it. The request is legitimate; the rule is a false positive.
What Causes the 406 Error
- ModSecurity false positive: a WAF rule matching legitimate post content, form data, or URLs — the #1 cause on shared hosting.
- Over-strict OWASP CRS rules: outdated rule sets flagging normal CMS behaviour.
- Content negotiation mismatch: the client’s
Acceptheader asking for a format the server cannot provide (the textbook 406). - Security plugin interference: WordPress firewall plugins with aggressive request filtering.
- Corrupted browser data: stale cookies or a mangled Accept header from extensions.
- CDN security rules: Cloudflare or Sucuri edge rules rejecting the request pattern.
How to Fix the 406 Error: 7 Steps
Step 1: Confirm it is ModSecurity
Try the same action in an incognito window with extensions off. If it still fails, check the timing: 406 on post publish, form submit, or file upload on shared hosting is ModSecurity until proven otherwise. Ask your host to check the ModSecurity audit log for your request — the log names the exact rule ID that fired.
Step 2: Get the offending rule whitelisted
Send your host the rule ID from their log and ask them to disable that specific rule for your domain. Surgical whitelisting beats blanket disabling: you keep the firewall’s protection and stop the false positive. Most hosts do this within hours on a support ticket.
Step 3: Disable ModSecurity for the domain (temporary test)
In cPanel → Security → ModSecurity, you can toggle it off per domain. Use this to confirm ModSecurity is the cause — then turn it back on and pursue the rule whitelist from Step 2. Running without a WAF permanently is not the fix.

Step 4: The .htaccess workaround
If your host allows it, you can disable ModSecurity’s filtering for specific paths via .htaccess:
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
Scope it to the affected directory only, and prefer the host-level whitelist — .htaccess overrides do not work on all server configurations.
Step 5: Check security plugins and the CDN
Temporarily disable WordPress firewall plugins (Wordfence, Sucuri, All-In-One Security) and retest — plugin firewalls can 406 the same way. In Cloudflare, check Security → Events for blocked requests matching your action and adjust the rule or create an exception.
Step 6: Fix genuine content-negotiation 406s
If no WAF is involved (API work, custom apps): inspect the request’s Accept header and broaden it (e.g. Accept: */*), or make the server return a sensible default like text/html when it cannot match. Tools like Postman or curl (curl -v -H "Accept: application/json") show exactly what was asked and answered.
Step 7: Update the rule set
Ask your host whether they run a current OWASP CRS (4.x in 2026) — outdated rule sets false-positive far more. Updated rules, tuned in DetectionOnly mode before enforcing, cut legitimate-request blocks dramatically. If 406s persist on uploads instead, check our 413 error fix.
How to Prevent 406 False Positives
After any fix, re-test the exact action that triggered the 406 (publish, submit, upload) — WAF behaviour changes with rule updates. Keep a note of whitelisted rule IDs so a host migration does not resurrect the problem. Avoid pasting raw script-like content into forms where avoidable, and keep ModSecurity’s CRS updated. A monthly action test with a free site health tool catches new false positives early.
Conclusion
On shared hosting, 406 almost always means ModSecurity blocked a legitimate request: get the rule ID from your host’s log, whitelist it surgically, and keep the firewall on. For genuine negotiation failures, fix the Accept header. Either way, the request is legitimate — make the server agree. For more firewall and server fixes, follow the KamiWeb blog.
