Ban IP Address to Avoid Spam Comments on your Blog!

Till yesterday, I get myself irritated after logging in to the admin account that most of the comments made on my blog were spams. Though I am using Akismat Spam filter but it doesn’t seem to be very useful as this doesn’t block a spam comment but instead it stored them in spam area to moderate and every day I have to do this unnecessary job to make my blog clean.

But it was only yesteday when I was wondering on how to avoid such spams from accessing my Blog. Then I noticed that there is almost 4-5 comments made from the same IP address. This means there are some people very active, spreading the spam comment and there is only a single way to get rid of them — block their IP address…

There are two methods which are widely used to block IP address for further accessing any blog let them discuss one by one:

Method 1

This is done using the CPanel IP Deny Manager but somehow this method was missing from my control pane but if exists to your side and you want to apply this method then follow this simple instruction:

Step 1: To access the IP Deny Manager, click on the corresponding icon in the Security section of your cPanel interface.

Step 2: Enter the IP address or domain name you wish to deny access to in the blank field next to IP Address or Domain: (You can enter an IP block such as 1.2.3. to deny access to all IPs that start with 1.2.3.).

Step 3: Click on Add.

This will hopefully solve your problem.

Method 2:

By editing the .htaccess file from the root menu of your website blog.

1. Here i assume you know how to use Filezila or any other FTP uploading software
2. Now browse to your root folder and look for a file called .htaccess and open in notepad (if not exist then create a new one using notepad)
3. Add the following code to your .htaccess file:

order allow,deny
deny from 100.201.340.4
allow from all

4. Replace 100.200.300.4 with the IP address you would like to block.
5. Save the file and upload it via ftp to your server

Side notes: You can easily add more blocked IP addresses. For each address just replicate the “deny from 100.200.300.4” line. Replacing the numbers with the IP you wish to block.

One comment

  1. –By ipaddress-whois.com–

    Address Lookup
    Domain name:
    IP Address: 100.200.200.4

    IP Location

    IP not exist or private

Leave a Reply

Your email address will not be published. Required fields are marked *