HTTP error 406 not acceptable appears on the screen when the server cannot recognize browser request. This error code stands together with more usual status codes like 301, 500 and 404.
There are 3 steps the browser should pass to connect the web server:
1) browser client gain the IP address from the DNS;
2) browser establishes IP socket connection with the gained from DNS IP address and put the HTTP data in the socket;
3) browser gets the HTTP data stream with the web server status code. On this very stage your browser client can show the error containing HTTP 406 status code.
Reasons for HTTP Error 406.
Browser client together with the request sends an Accept Header that notifies the web server in what format the browser is willing to accept the data. In case if it is impossible for the web server to dispatch the data in the necessary format, it returns ‘the HTTP error 406 not acceptable’, which implies that the file is located in client system but it cannot recognize the format of the file. This occurs because the MIME type chosen in Accept Header does not manage to tie together with the MIME type chosen in the requested file name extension. The browser can only process the files it can read, for instance, HTML and GIF. Since it cannot read the multimedia files , it delivers HTTP error 406 not acceptable.
How to change the Accept Header
To avoid this error you can edit the Accept Header. Follow the steps to make it possible:
1) open the IIS manager in your cPanel;
2) click on the Web Sites and choose the one you want to modify;
3) in Features choose the MIME Type;
4) insert the proper MIME Type in the MIME Type box.
NOTE: to check the file types which are not acceptable go to the ‘Preferences’ in the browser.
Mod_Security Rule Setting
You can receive ‘HTTP error 406 not acceptable’ if you server uses mod_security rule setting. Quite a big number of hosting companies uses Mod_security (Apache module). It helps to protect the website from various hazards. It can blocks Get and Post requests.
When the reason of 406 error is Mod_security, in this way you can disable this setting for necessary domains. It is easy to perform this with the help of ‘Modsec manager plugin’ in the cPanel.
Hosting providers does not provide its customers with the option to disable the Mod_security setting. You can also disable the Mod_security through SSH command line.
If you want to disable just particular Mod_security rules or if you are not aware of this stuff at all, then contact your hosting provider to guide you through the whole process.