Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

12 Vital Tips and Tools to Combat Comment Spam in WordPress

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
12 Vital Tips and Tools to Combat Comment Spam in WordPress

Are you receiving a lot of spam comments on your WordPress blog? You’re not the only one. Thankfully over the years, we have learnt several ways to combat comment spam in WordPress. In this article, we will share some of the most valuable tips, and WordPress plugins to combat comment spam in WordPress.

1. Activate Akismet


Akismet is one of the most valuable plugins for WordPress. You do not need to download it as it comes pre-installed with all WordPress installation. But you do need to activate it and get an API key. You can find out more about Akismet in our Akismet 101 Guide for WordPress Beginners. Without this, you have no chance against SPAM. Akismet does a great job in catching SPAM comments. Although sometimes good comments get filtered as SPAM, but you can always recover them by going through your SPAM comments regularly.

2. Nofollow Comment Links

Sometimes new bloggers add plugins to remove nofollow attribute from comment author links. They think that by making these links dofollow they will be able to encourage more users to leave comments. This results into a very high number of spam comments. Even non-spam comments are usually submitted by users who are not interested in the discussion but the link back. Remember, its always about quality not quantity. It is always a bad idea to use plugins that share link juice via comments. If you are not using any such plugin, then thats great you can move on to the next step.

3. Reduce Comment Spam Using Cookies

To use this method you will need to install and activate the Cookies for Comments plugin. Most spam bots are automated scripts, and in order to spam more sites in less time they don’t download any images or stylesheets. This plugin sends users a stylesheet or image file whenever they access a page with the comment form. If a user’s browser automatically downloads those files then the plugin sets a cookie identifying them as legit users. To learn more how to use this clever solution, checkout our guide on how to reduce comment spam using cookies.

4. Block Spam Comment Bots Using Honeypot

Honeypot technology is an effective method to trick spambots into identifying themselves. First you need to install and activate the WP Spam Fighter. Upon activation simply go to Settings » WP Spam Fighter and enable the honeypot protection. This will add a hidden form to your comments area visible only to bots. These spam bots are usually programmed to fill out all fields in a form. Learn more about how to block spam comment bots in WordPress using honeypot.

5. Add Captcha Verification

Using WP-reCAPTCHA plugin, you can enable recaptcha challenge on your comment forms. Recaptcha shows an image containing characters, users need to type those characters to prove that they are human. While recaptcha is an effective way of blocking spam bots, it does nothing to prevent your site from manually submitted spam comments. Another concern with recaptcha is that they make it difficult for users to submit comments. On the other hand, reCAPTCHA is a quick and effective way to block spambots. See our guide on how to block spam comments in WordPress with CAPTCHA.

6. Removing Website URL Field from Comment Form

The URL field in the comment form attracts not only spammers (both automated and human) but it also invites people who have absolutely no interest in discussion at all. These comments usually contain a line of two of irrelevant non-sense, the comment author name will contain a keyword or a combination of real name with keyword like Sally from Dunder Mifflin, or John @SEOconsultants, etc. Removing the URL field from comment form will discourage this kind of behavior on your website. See our guide on how to remove URL field from WordPress comment form.

7. Disable Comments on Media Attachments

WordPress automatically creates image attachment pages where users can see an image and even leave a comment for it. IF you are linking your images to the attachment page, then after a while you will have lots of attachment pages with comments enabled on them. If images are the central part of your content then that’s fine. But if you don’t want users to comment on images instead of posts then you should turn off comments on media attachments. Here is a tutorial on how to disable comments on WordPress media attachments.

8. Disable HTML in Comments

Another handy tip to discourage links in comments is disabling HTML in comments. The easiest way to do this is by using Peter’s Literal Comments plugin. Simply install and activate the plugin and any comments submitted to your site after that will get all HTML parsed through WordPress filters. This will change double quotes, less than and greater signs into HTML entities. Learn more about disabling HTML in WordPress comments.

9. Less Annoying Captcha

As we mentioned earlier that many users find CAPTCHA annoying and disruptive. A less annoying alternative to CAPTCHA is the Math Quiz plugin, which asks users to solve a simple math problem to prove that they are human. Simply install and activate the plugin, and then visit Settings » Math Quiz to configure it. The plugin allows you to modify comment form CSS, though in most cases you wouldn’t need to. It also allows you to choose where you want an image based math quiz or simple plain text quiz. Plain text quiz is easy to read but also easy to solve by spambots. The image based math quiz is not that readable, but is slightly difficult to solve by spambots.

10. Disable Trackbacks

A big portion of comment SPAM is trackbacks. For some blogs it is not even necessary to have trackbacks. You can choose to disable trackbacks on your entire blog, or in an individual post. This can prevent comment SPAM and it is very easy to do so.

disable trackbacks

You can find the above option by visiting Settings » Discussion. This will turn off trackbacks for your entire site. But if you want to turn off trackbacks on specific posts, you will need to specify it either when writing a post, or edit a post and change this option.

Disable trackbacks and comments on a single post

11. Turn off Comments on Old Posts

WordPress allows you to set a comment closure deadline. Simply go to Settings » Discussion, under ‘Other comment settings’ you will see the option ‘Automatically close comments on articles older than’. Check the box next to this option and enter the number of days you want comments to be displayed on a post.

Close comments on older posts in WordPress

WordPress will now automatically close comments on posts older than the number of days you defined for this option. If you need, you can override comment deadline in WordPress for individual posts where you would like comments to remain open.

12. Switch Off Comments

In case you feel that you don’t need comments on your WordPress site, or comment moderation goes out of your hands, remember that you can always switch off comments in WordPress. All you have to do is go to Settings » Discussion and uncheck the box next to ‘Allow people to post comments on new articles’.

Switch off comments in WordPress

You can also make comments for registered users only by checking the box in your Settings ~ Discussion page.

Frequently Asked Questions by Users

Why are they spamming me?

They want to get a better pagerank or lure unsuspecting visitors to dubious and malicious sites. They think that by spamming they can get more links and it will some how positively affect their pagerank. It is nothing personal against you for the most part, and many blogs face this issue, you are not the only one.

What happens to comments that are marked as “Spam”?

The comments that you mark as spam, are not displayed and are listed on a separate page when you have Akismet installed. You can delete Spammed comments in batch and/or recover good comments from the SPAM list.

Why is every comment going into the moderation queue?

Go to the Settings ~ Discussion panel and make sure that “An administrator must approve the comment” is unchecked. With that option selected, all comments are sent to the moderation queue to await approval. Make sure that Hold a comment in the queue if it contains more than x links is not blank and contains a number higher than zero.

We hope this article helped you find useful tips and tools to combat comment spam in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Google+.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. Nate Balcom says:

    I find adding an expiration date to comments and a good captcha option slow down the spam comments quite a bit. I recently installed Google’s “Recaptcha”. It’s pretty un-intrusive and doesn’t seem to bother commenters.

    I considered removing the site URL link-back, but thought it would slow or stop people from commenting. It looks like that’s not the case here. Did you notice a slow down in comments when you did this?

    Love the site. Keep up the good work. Do you ever accept guest posters?

  2. Bek says:

    Thanks for the post! I have a question – I have been getting a lot of spam comments recently, most of them are rambling irrelevant posts about camping equipment or cam sites etc and I mark those as spam straight away. However some of the comments are actually relevant to the post and make sense but then have a random spam link thrown in at the end or in the ‘URL’ field – for those posts, I have been editing them – making sure that any links are removed and also changing the name to a non-keyword name (they usually use real email addresses so I can get their name from that) and then posting/approving the edited comments.

    Does this effect my rankings in any way? And is it a clean way to post the comments or should I just trash/spam them all and not both editing?

    Thanks for your help!

    • WPBeginner Support says:

      It does not effect rankings. However, perhaps it would be better if you don’t edit and fill in the name field yourself. If a user has used keyword in their name, then you should trash such comment. Editing comments to make them more readable is OK.

      • Bek says:

        Why though? Is there a reason that I shouldn’t be adding/approving these comments for my site? Will it effect me negatively? I am just removing any links and *occassionally* changing their name to their actual name based on their email address. Does this effect my website in any way?

        • WPBeginner Support says:

          It doesn’t. But changing the name a user has chosen to identify themselves seems a bit inappropriate. If their name was like ‘John Smith From’, then you can remove ‘from’ off the name field. However, if their name was or a keyword, then the user has given you no name to show. You can of course try and find out names, but may be the user didn’t want to use a name and by doing so you will be violating their privacy and rights. We think all this trouble is not worth the effort. There are other ways to get more and better engaged users to comment.

  3. Muhammad Tabish says:

    Wow,Thanks For The Informative WordPress Comment Spam, Tutorial, Keep Sharing

  4. Farrah says:

    Wonderful article. Thanks so much for sharing it! :)

  5. AmiR Bin says:

    I’ve just installed Akismet plugin, what should I do? It doesn’t do anything.
    May you introduce more captcha plugins(easy for uneducated fools to fill)

    • WPBeginner Support says:

      Akismet works in the background as a filter. Soon you will start noticing spam comments appearing under the SPAM filter on your comment moderation screen.

      You can use CAPTCHA, but CAPTCHA is bad for user experience and discourages your users from commenting.

  6. AmyPrint says:

    Just installed Askimet, Thank you very much!

  7. Pradeep says:

    Good information. Hope to have less spam. Thanks

  8. imVictorLee says:

    Thanks for the information. Have just installed Askimet. Hope it works for me.

  9. Gulshan Kumar says:

    I’m coming to this post after 5 months approximately, according to your recommendation I started using using Cookies for Comment plugin and today I’m not getting a single spam comment. Thank you so much.

  10. sig says:

    Hello, this is a little bit off theme…

    I want some of my posts to be protected with password. It is OK that i give a password, but i want the excerpt of the post to be readable for all the visitors. is there a plugin for it or do u have any other idea to solve it? thx in advance.

  11. Jennifer says:

    Thanks for the article. Great info and helped me stop a spam assault on my new blog instantly.

  12. Shafiuddin says:

    this is a very informative guide sir,i have a niche blog even after installing askimet and other plugins i’m getting atleast 5 spam comments per day from one pager seo companies[mostly scam].I guess these comments are coming from could i ban those bots on my blog ?

  13. Teguh IW says:

    akismet is enough to stop spam…

  14. WPBeginner Staff says:

    It actually depends on each site. If a site owner feels that comments are not contributing to the discussions on their site, or not helping them grow, then they can decide to remove them.

  15. Neil Ashworth says:

    Very comprehensive post – and I see you are still using Disqus for comments. There’s been some debate around closing comments all together recently (Copyblogger closed their comments in late 2014) – what do you think? is it something to consider for new blogs with little traffic/comments too?

  16. Levent Cem Aydan says:

    I just uploaded Disqus to fight spam for my company blog, but these are a much better solution I guess. Thank you for this article.

  17. Robert says:

    Hello, this is a little bit off theme…

    I want some of my posts to be protected with password. It is OK that i give a password, but i want the excerpt of the post to be readable for all the visitors. is there a plugin for it or do u have any other idea to solve it? thx in advance.

  18. Peter Cralen says:

    I still don’t understand why they spam comments in 2014. Ok, 20 years ago, but now ? wasting energy for them and blogger.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.