How to disable ModSecurity in cPanel

To protect websites, we use a commercial ruleset on our Web Application Firewall called ModSecurity.

ModSecurity is an Apache module that helps protect your website from various threats. It works by blocking commonly known exploits using predefined rules and regular expressions. By default, ModSecurity is enabled on all servers to enhance security.

ModSecurity helps prevent:

In some cases, especially with custom or dynamic applications, ModSecurity may block legitimate requests if the application does not properly validate input. When this happens, you may encounter a 406 Not Acceptable error.

How ModSecurity Works

How to Disable ModSecurity in cPanel

If your application requires it, you can disable ModSecurity for a specific domain by following these steps:

  1. Log in to your cPanel.

  2. Navigate to the Security section.

  3. Click on ModSecurity.

  4. Locate your domain and toggle ModSecurity OFF.

That’s it! ModSecurity will now be disabled for the selected domain.

⚠️ Important Note:
Disabling ModSecurity reduces your site’s protection. It is recommended to disable it only if absolutely necessary and ensure your application has proper security checks in place.