How to Prevent Spam Comments In WordPress 

How To Prevent Spam Comments In WordPress

Comment spam is a common problem to all websites or blogs. These are postings by spammers or spambots with the intention of placing unsolicited advertisements to appear in your comments area. You will have to spend a lot of your time moderating your comments and sort out the spam comments. Spam comments add up into your database, increasing the overall size of your database and eventually slowing down your website. It is, therefore, necessary to learn how to stop spam comments on your website or blog.

It’s almost an impossible task to completely block spam comments to your website or blog. Even if you disable comments, you won’t see them but they will add up in your database.

On this page we will look at:

Types of comment spam
Ways to identify spam comments
How to reduce spam comments

Types Of Comment Spam

We will look at the three forms in which comment spam normally appears in your comment area. These are the normal comments that are created when your readers type in your comment form on your website or blog, the trackbacks and the pingbacks. Let’s have some word on pingbacks and trackbacks .


A pingback is a type of comment created when a blog owner links to another blog. Let’s say a person posts something on his site and a second person also posts on his site linking to the first person’s post. Automatically the first person receives a pingback when both of their sites have pingbacks enabled. A pingback is a way of notifying a site owner that you have linked to them and you create it by just linking to the other site.


Trackbacks, like pingbacks, are a way to to notify sites that you have linked to them. Their difference lies in that trackbacks, unlike pingbacks which are automated and no content is sent, have to be created manually and send an excerpt of the content.

Ways To Identify Spam Comments

Comments, pingbacks and trackbacks can all be used as spam. You, the site owner have the task to moderate them to find out which ones are good comments and which are spam comments. There are no rules to this but the following tips should help you to determine spam comments in your comment area.

When you read a comment and find that it doesn’t relate to your topic, in other words, when the comment shows that the comment author did not read your content. Some savvy spammers write comments in such a way that they could apply to any post. Then this indication that they are spamming.

When the comments is stuffed with the comment author’s links or when links in the comment do not match with your niche then probably it is a spam comment. Some of your readers would want to click on the links given in the comments, would you want them to go there? If the answer is no, don’t approve the comment or delete the link(s).

Scrutinize the names and email addresses of the comment author. You should be doubtful when they don’t seem to be names of real persons or real email addresses.  Some spammers would just scribble some letters and numbers as names and email addresses. They use fake identities.You may also find that the same comment author has written comments using different email addresses or from different websites.

Follow links in the pingbacks and trackbacks and decide whether the site owner had a good reason for the trackback or not. If you think it was just for the sake of getting a trackback to his site, then don’t approve it.


How To Reduce Comment Spam

Configure Discussion Settings

You can reduce the number of spam comments to you website by correctly configuring your discussion settings. From your wordpress dashboard go to Settings>>Discussion and then configure your settings as follows:

At the top “Default article settings”, you can decide whether to allow trackbacks and pingbacks or not. If you think you don’t have to allow them, make sure you uncheck on the line for this option.

The second section “Other comment settings” has on option to “Automatically close comments on articles older than -”. What to set here depends on your site. Spammers look for new articles but more so for older articles with a lot of traffic and articles with high search engine rankings. Articles gain popularity in the first few weeks and that’s when you get a lot of comments.The search engine rankings start at zero growing steadily as time goes. You could therefore consider to configure to automatically close comments on articles older than 60 – 100 days.

On the section “Before a comment appears”, using the first option “Comment must be manually approved” means every comment must be approved manually before being published. Using this setting no spam comments will ever be published but requires you to check your comment area regularly otherwise you will have a lot of comments in the moderation queue which will slow down any discussion that is going on and frustrate your regular commenters. The use of the second option ” Comment author must have a previously approved comment” means every comment author will have his first comment sent to the moderation queue but subsequent comments published. I think this is a good option to use the only catch to this can be when a spammer sends a genuine comment once and starts spamming later on knowing that he/she has been approved.

Comment Moderation: A characteristic of spam comments is to contain links. If you set “Hold a comment in the queue if it contains-” to 1, any comment with a link will be sent to the moderation queue. This will help to curb spam comments that contain only one link.

The “Comment Blacklist” is very useful in controlling spammers with specific names or who promote specific products. It’s a very useful feature because you can blacklist commenters using their IPs, email addresses, URLs or names.


Use Anti-Spam Plugins

Configuring the settings correctly should help you a lot in combating comment spam. The other method is the use of a wordpress anti-spam plugin to stop spam comments.There are hundreds of plugins which have been developed to help fight comment spam for wordpress. A plugin that is well known to wordPress users is Akismet which comes installed by default. This is a very effective plugin that filters spam comments into a spam folder. It’s a free plugin for personal websites and blogs though you can donate. It costs between $5-$50 for non-personal websites and blogs.

To use Akismet you need to sign up and get an API from their website. You can also read my article “How To Install WordPress Plugins” on how to activate Akismet.

Another plugin worth considering is “The Really Simple Captcha“. It helps to fight spam by introducing a captcha web form that has to be filled manually by the commenter thus ensuring only humans can submit comments.

On this article we looked at three types of comment spam; the comments, pingbacks and trackbacks. We then looked at ways of identifying spam comments and finally went through some methods of preventing spam comments in wordpress. We explained how to configure the discussion settings and  mentioned the two plugins you can use to avoid comment spam. These are the methods I use and work very well for me.

What other effective methods do you use to reduce comment spam? Please be free to share.


Leave a Reply