Skip to content

How can I block an IP from my website?

All shared, reseller, and semi-dedicated hosting plans allow you to block individual IPs or entire ranges from accessing your sites.

  1. Log in to cPanel and search for IP Blocker (listed under Security).

  2. Enter the IP address you wish to block in the provided field and click Add.

  3. The blocked IP will appear under Currently-Blocked IP Addresses. You can remove blocks from this same interface.

You can also add block rules to your site’s .htaccess file (usually in the document root).

Block a single IP:

order allow,deny
deny from 1.2.3.4
allow from all

Block multiple IPs:

order allow,deny
deny from 1.2.3.4
deny from 5.6.7.8
deny from 9.10.11.12
allow from all

Block an entire IP range:

order allow,deny
deny from 1.2
allow from all

Replace the example IPs with the actual addresses you want to block.