WEB HOSTING SUPPORT NETWORK
     
 

Blocking certain IP addresses from viewing your site

To block a specific IP address from accessing your site, you should add the following line to your .htaccess file:

deny from xxx.xxx.xxx.xxx

xxx.xxx.xxx.xxx is the IP address that you want to block. If the .htaccess file does not exist, you can simply create it.

For example, if you want to block 1.2.3.4, the line in your .htaccess file should be:

deny from 1.2.3.4

To prevent a range of IP addresses from a given network (123.234.0.0) from reaching your site, you can do that in the following way:

deny from 123.234.

This way all addresses that start with 123.234 will be blocked.

You can add as many such rules as you want. You should note that if your .htaccess gets large, it may slow-down the loading of your site, as the file is being processed on each file request.

You can also block IP addresses and ranges via your Control Panel's Protection section. You can find details at http://suresupport.com/faq/76/453.