Knowledgebase
Blocking an IP Address
Posted by Rick G. on 03 May 2015 09:55 AM

Sometimes you just don't want a certain person (or bot) accessing your website at all. One simple way to block them is to ban their IP address in your .htaccess file:

order allow,deny
deny from 192.168.44.201
deny from 224.39.163.12
deny from 172.16.7.92
allow from all

The example above shows how to block 3 different IP addresses. Sometimes you might want to block a whole range of IP addresses:

order allow,deny
deny from 192.168.
deny from 10.0.0.
allow from all

The above code will block any IP address starting with "192.168." or "10.0.0." from accessing your site.

Split-Dedicated Server clients have the ability to directly interface with the servers firewall.  Within cPanel go to "Security -> Server Firewall".  From here you can block, unblock and ignore (or whitelist) any IP adddress or range of IP addresses you wish and this will use the servers firewall to manage specific IP address access at the server level.

(2 vote(s))
This article was helpful
This article was not helpful