{"id":50443,"date":"2026-11-20T05:24:10","date_gmt":"2026-11-20T05:24:10","guid":{"rendered":"https:\/\/kickhost.com\/guides\/how-to-enable-or-disable-mod-security-in-cpanel\/"},"modified":"2026-11-28T09:42:38","modified_gmt":"2026-11-28T09:42:38","slug":"how-to-enable-or-disable-mod-security-in-cpanel","status":"publish","type":"kickhost_tutorial","link":"https:\/\/kickhost.com\/en-ke\/guides\/how-to-enable-or-disable-mod-security-in-cpanel\/","title":{"rendered":"How to Enable or Disable Mod Security in cPanel"},"content":{"rendered":"<p>ModSecurity is a firewall module that blocks suspicious requests. Sometimes it blocks legitimate actions, such as saving a post or uploading a file.<\/p>\n<p>Are you facing the issue of IP getting blocked repeatedly? If the answer is Yes, then it may have happened due to Mod Security.<\/p>\n<h2>What is Mod Security?<\/h2>\n<p>ModSecurity is a module that protects your website from various types of attacks. Mod Security protects a website from hackers, brute force attacks, cross-site request forgery(CSRF), and many other threats. Although it sometimes creates a problem, we do not recommend you to disable it but instead fix your software&#8217;s vulnerability.<\/p>\n<p>Disabling ModSecurity can help you determine whether ModSecurity blocks your IP or not. However, if your IP is blocked for a different reason, then contact us. We will find the exact reason behind it in order to resolve your issue so that you will not be required to disable the module.<\/p>\n<p><\/p>\n<h2>How to Enable or Disable Mod Security in cPanel?<\/h2>\n<p><strong>1.<\/strong> Log in to your cPanel account.<\/p>\n<p><strong>2.<\/strong> In the <strong>Security<\/strong> section, click on <strong>ModSecurity<\/strong>.<br \/><img decoding=\"async\" src=\"https:\/\/kickhost.com\/img\/mod-security-icon.gif\" loading=\"lazy\" alt=\"\"><\/p>\n<p><strong>3.<\/strong> If ModSecurity is enabled, it shows the Disable option. Click it to disable ModSecurity on all domains. The next time you want to enable it, click on <strong>Enable<\/strong> to enable it on all domains.<br \/><img decoding=\"async\" src=\"https:\/\/kickhost.com\/img\/disable-modsecurity-in-cpanel.gif\" loading=\"lazy\" alt=\"\"><\/p>\n<p><\/p>\n<h2>How to disable ModSecurity only on selected domains?<\/h2>\n<p>You may have multiple domains, and you would want to disable or enable ModSecurity on selected domains.<\/p>\n<p><strong>1.<\/strong> Log in to cPanel, and from the <strong>Security<\/strong> section, click on <strong>ModSecurity<\/strong>.<\/p>\n<p><strong>2.<\/strong> Scroll down to the bottom of the page.<\/p>\n<p><strong>3.<\/strong> Under the <strong>Status<\/strong> option, next to the domain, click on <strong>On<\/strong> or <strong>Off<\/strong>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/kickhost.com\/img\/modsecurity-disable-selected-domain-cpanel.gif\" loading=\"lazy\" alt=\"\"><\/p>\n<h2>Keep it on where possible<\/h2>\n<p>Disabling ModSecurity lowers protection. Try to fix the cause first or ask support to whitelist a rule.<\/p>\n<h2>Disable only for testing<\/h2>\n<p>If you must turn it off, do it for a short test and turn it on again.<\/p>\n<h2>Frequently asked questions<\/h2>\n<p><strong>Why am I getting blocked?<\/strong> A request may look like an attack to a rule. Support can check the log.<\/p>\n<p><strong>Is it safe to disable?<\/strong> It reduces security, so turn it off only when needed and for a short time.<\/p>\n<h2>Related guides<\/h2>\n<ul>\n<li><a href=\"https:\/\/kickhost.com\/en-ke\/guides\/how-to-restrict-access-to-directories-by-ip-address\/\">Restrict a directory by IP address<\/a><\/li>\n<li><a href=\"https:\/\/kickhost.com\/en-ke\/guides\/how-to-enable-the-two-factor-authentication-on-your-cpanel-account\/\">Enable cPanel 2FA<\/a><\/li>\n<\/ul>\n<p>Need cPanel hosting in Kenya? <a href=\"https:\/\/kickhost.com\/en-ke\/web-hosting\/\">See KickHost hosting plans<\/a> or <a href=\"https:\/\/kickhost.com\/en-ke\/contact\/\">contact our team<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Enable or disable ModSecurity in cPanel. Steps for KickHost customers in Kenya.<\/p>\n","protected":false},"featured_media":0,"template":"","class_list":["post-50443","kickhost_tutorial","type-kickhost_tutorial","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/kickhost_tutorial\/50443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/kickhost_tutorial"}],"about":[{"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/types\/kickhost_tutorial"}],"version-history":[{"count":3,"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/kickhost_tutorial\/50443\/revisions"}],"predecessor-version":[{"id":53451,"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/kickhost_tutorial\/50443\/revisions\/53451"}],"wp:attachment":[{"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/media?parent=50443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}