How to protect your site against 'content type sniffing' using cPanel

269ac00f765508cb74b25d006dbf5bb2

Written by Dennis Nind

Last published at: February 8th, 2019

Content sniffing, also known as media type sniffing or MIME sniffing, is the practice of inspecting the content of a byte stream to attempt to deduce the file format of the data within it. Content sniffing is generally used to compensate for a lack of accurate metadata that would otherwise be required to enable the file to be interpreted correctly. Content sniffing techniques tend to use a mixture of techniques that rely on the redundancy found in most file formats: looking for file signatures and magic numbers, and heuristics including searching for well-known representative substrings, the use of byte frequency and n-gram tables, and Bayesian inference.

  1. Login to cPanel
  2. Go to 'Nginx Cluster Control' section and select 'CLOUDNS'
  3. Select the domain you wish to enable the protection for from the dropdown list and click 'Configure'
  4. Select 'Application Settings'
  5. Enable the 'disable_contenttype_sniffing' option
  6. Click 'Submit'