How to Block Abusive IP Addresses from My Website
Here are a few ways to block an unwanted IP address:
Edit the .htaccess file. This works for web servers using Linux/Unix hosting platforms:
- 1) Copy the abusive IP address from your WhoStats report
- 2) Login to your webserver
- 3) Open the .htaccess file (or create one using notepad) and add the following line to the bottom of the file: Deny from 192.168.1.0
If you have access to the router or firewall, you can block the IP address using the management tools provided with your device.
If your website is hosted on a Windows platform, you will likely have to submit a support request to have an IP blocked. With direct access to the Windows server, you can use the MMC to create an “IP security policy”.
Some hosting providers offer a feature that allows you to manage blocked IP addresses. Check the administrative control panel for your domain for a menu option that allows you to “Block an IP address”.