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.
Blocking IPs through cPanel
Section titled “Blocking IPs through cPanel”-
Log in to cPanel and search for IP Blocker (listed under Security).
-
Enter the IP address you wish to block in the provided field and click Add.
-
The blocked IP will appear under Currently-Blocked IP Addresses. You can remove blocks from this same interface.
Blocking IPs through .htaccess
Section titled “Blocking IPs through .htaccess”You can also add block rules to your site’s .htaccess file (usually in the document root).
Block a single IP:
order allow,denydeny from 1.2.3.4allow from allBlock multiple IPs:
order allow,denydeny from 1.2.3.4deny from 5.6.7.8deny from 9.10.11.12allow from allBlock an entire IP range:
order allow,denydeny from 1.2allow from allReplace the example IPs with the actual addresses you want to block.