How to avoid Spam comments on Wordpress using .htaccess method

by Harsh Agrawal on April 28, 2009

in Wordpress

These days I’m seeing lots of wordpress spam comments.The simplest way to avoid spammer is by using Akismet wordpress pluginwordpress_logo

You can get the Akismet Wordpress plugin from here.

Though at times if you will see your comment spam page, you might find few IP’s are constantly sending comment spam. The easiest way to get rid of these spam is by blocking their IP address using .htaccess method.

I highly recommend keeping a backup of your .htaccess file before editing it.

If you don’t know how to edit your .htaccess file, read my previous post on

how to edit wordpress .htaccess   file

Here is the code that you need to enter in your .htaccess file, and upload it.

<Limit GET POST>
order allow,deny
deny from 88.146.119.120
allow from all
</Limit>

You can always enter more IP’s by adding one more line

deny from xx.xxx.xxx.xxx

You can get the IP of the spammer in your spam comment page, under wordpress dashboard

wordpress_Spam_comment

I find this way to be the best way to fight against the lots of spam from bots.

If you are not familiar with wordpress, do read my previous tutorial on

Step by step guide to Install self hosted #Wordpress blog

Enter your email address:

Related posts:

  1. Block Visitors From Specific IP Address Using .htaccess method
  2. How to Create .htaccess File For Wordpress blog
  3. How to stop spammer from hotlinking your blog Images using .htaccess method
  4. Wordpress Trackback Spam : New method of spamming
  5. How to edit your wordpress .htaccess file


{ 1 comment… read it below or add one }

1 Nihar April 30, 2009 at 11:51

I did this before. When some bad guy kept spamming and also used abusive language.

Nihar™s last blog post..Increase Blogs internal linking using SEO Smart Links Plugin

Reply

Leave a Comment

Previous post:

Next post: