How do I block an IP address or country? Print

  • 0

To block specific visitors, log in to cPanel and open IP Blocker. Enter a single IP, a range, or a CIDR block and click Add. Those addresses can no longer reach your site.

To block an entire country, you'll need their IP ranges. You can add country ranges via IP Blocker, or use .htaccess rules. A simpler approach for large-scale blocking is Imunify360 and ModSecurity, which automatically stop many malicious sources for you.

  1. Use IP Blocker for a few known bad IPs.
  2. Use .htaccess Require directives for finer control.
  3. For heavy or country-wide blocking, open a ticket so we can help at the firewall level.

Was this answer helpful?

« Back