Disable ModSecurity from cPanel Print

  • Updated on 07-May-2024
  • 132

ModSecurity is a web application firewall (WAF) that can be installed on a web server to provide an additional layer of protection against various types of web-based attacks. It is an open-source software that runs as an Apache or NGINX module and can be integrated with various web applications, including content management systems (CMS), e-commerce platforms, and more.

ModSecurity works by analyzing incoming web traffic and comparing it against a set of predefined rules to identify and block potentially malicious requests. The rules can be customized to fit the specific needs of a web application and can be updated regularly to adapt to new threats.

Some of the types of attacks that ModSecurity can protect against include SQL injection, cross-site scripting (XSS), file inclusion exploits, and more. By blocking these types of attacks, ModSecurity can help prevent data breaches, website defacement, and other types of cybercrime.

To disable ModSecurity from cPanel, follow these steps:

Log in to your cPanel account.

Scroll down to the “Security” section and click on the “ModSecurity” icon.


On the ModSecurity page, you’ll see a list of domains associated with your account. Find the domain for which you want to disable ModSecurity and click on the “Off” button next to it.

You’ll see a message confirming that ModSecurity has been disabled for the selected domain.

if you want to disable ModSecurity for a specific directory, you can do so by adding the following lines to your .htaccess file:

     <IfModule mod_security.c>
     SecFilterEngine Off
     SecFilterScanPOST Off

This will disable ModSecurity for the directory where the .htaccess file is located and any subdirectories. The first line turns off the filtering engine, and the second line turns off scanning of POST requests.

Important Note: Disabling ModSecurity can leave your website vulnerable to certain types of attacks, so it’s important to weigh the risks and benefits before making this decision. If you’re unsure whether or not to disable ModSecurity, you should consult with a security professional or your web hosting provider for guidance.

Was this answer helpful?

« Back