Enable Mod Security in cPanel for any Domain

What is ModSecurity?

ModSecurity is a Web Application Firewall (WAF) that protects all the incoming threats and blocks them before they can harm your website. It uses a real-time blocking system. ModSecurity uses an automatic rule-based firewall to identify the threats. It can protect your website from real-time threats such as session hijacking, SQL Injection, cross-site scripting, and others.

In this tutorial, we’re gonna walk you through simple steps to disable or enable ModSecurity from your cPanel account.

Enable/Disable ModSecurity in cPanel

Follow the below steps to Disable/Enable ModSecurity in cPanel effortlessly.

  1. First of all, log into your cPanel account.
  2. Navigate to the SECURITY tab, and click on the ModSecurity option.

    ModSecurity
    ModSecurity
  3. Navigate to the Domains tab, find the domain you want to enable ModSecurity for, and hit the On/Off button to enable or disable ModSecurity for that specific domain.

    Enable ModSecurity
    Enable ModSecurity
  4. A popup will appear telling you that the ModSecurity is enabled or disabled.

    ModSecurity Disabled
    ModSecurity Disabled/Enabled
  5. That’s it.
    Also See: Run Shell Commands Using PHP Script in cPanel

That’s how you can easily Enable or Disable ModSecurity in your cPanel. However, while disabling the ModSecurity, you might see the below warning:

ModSecurity Warning
ModSecurity Warning
The warning says that “ModSecurity is disabled for your selected domain. However, we recommend you always keep ModSecurity enabled and only disable the ModSecurity when you’re troubleshooting a problem with your configuration. Enable the ModSecurity immediately once the troubleshooting is done. If ModSecurity is disabled, your domains may lose the extra layer of protection that the module provides“.

Note: If the ModSecurity feature is not visible inside your cPanel, you should contact your hosting provider and ask them to install and configure ModSecurity to your cPanel account. Other than this, you can manually configure ModSecurity if you have root access.

I hope this article helps you. If not, you can hit the comment section. We’ll be happy to assist you. Moreover, if you’re looking to purchase the Shared or WHM Hosting, then I’ll recommend you to check Redserverhost once. We’re one of the Cheapest Hosting Providers across the Internet with all the premium features that you would get at a much higher cost.