How do I use a .htaccess file to block people from coming to my website?

There often comes a time when the "open" nature of internet becomes a problem. This can be by accident (a badly behaving robot) or on purpose (someone attacking a banner network). In either case, the first level response is the same: block access with your .htacccess file :-).

This isn't meant to be a full fledged tutorial, but a quick example of the more common needs.

The most common scenario is where you want everyone except a few visitors to be able to get to your site. Your .htaccess file would start like this:

 

    
       <Limit GET>
       order allow,deny
       allow from all 
Then you follow that with lines to specify the addresses that you want to block:
    
       deny from 192.168.128.14
    
       deny from 192.168.128.
    
       deny from somehost.example.com
    
       deny from .example.com
       </Limit>
    


If you have any suggestions for or problems with this website, please e-mail
support@mercuryd.com