How To Prevent & Block Spam Comments On WordPress?

So, you are reading a tutorial to prevent and block spam comments on WordPress. We will try to cover all possible areas in this tutorial. As spammers are all over the internet spamming our websites. They are using bots that automate all the comments targeting different niches.

We own a few blogs and got lots of junk comments on those websites. There are several ways to prevent and block spam comments on WordPress and we are going to explore these methods and areas in our WordPress websites.

Block Spam Comments on WordPress using Plugins

There are lots of plugins available in the WordPress Repositories. Fighting against the spam is not difficult when you use a plugin. We will discuss the plugins that are useful for our WordPress blog to get rid of spam.

1. Use Akismet Anti-Spam Plugin

Akismet Anti Spam Plugin

Akismet is a plugin developed by Automattic (a company behind WordPress). As stated in the plugin section, Akismet checks comment against their global database to prevent possible spam. Check the major feature in the plugin description via the link mention above.

As on WordPress.com blogs, you can see the pre-installed Akismet plugin that helps to block spam comments on WordPress.

Akisment Plugin on Free WordPress Blog

But on the self-hosted blog, you need to install a plugin. So how to install Akismet Plugin

  1. Go to the plugin section
  2. Click on Add New
  3. Search for the plugin name (for this case, search Akismet Anti-spam Plugin)Installing Akisment Anti-Spam Plugin
  4. Click on Install Now and Activate it.
  5. After step 4, you need to set up your Akismet Account.Setup your Akismet Account
  6. Sign up to get the Akismet API key or if you already have a key then you can connect with API Key.Signup to Activate Akismet
  7. Akismet offers a different plan. If you want to go for free, then Activate Personal Plan.Akismet Personal Plan
  8. Fill the form with required credentials and Go with $0/year and continue the service.Go with Zero Dollar per Year

Learn to: Add hCaptcha to WordPress Website

2. reCAPTCHA Service by Google

The second way to prevent and block spam comments on WordPress is to use reCAPTCHA services via plugin available on WordPress Plugin Repositories. There are several plugins where you can choose one of them and install it on your blog. We will try to write a method that will be similar when you install a different plugin.

Let’s install a “Simple Google reCAPTCHA” plugin.

  1. Follow the above method to install a plugin.
  2. Register a site for Site Key and Secret Key. Register your Domain for reCaptcha
  3. Fill the required form as in the screenshot. We are using reCAPTCHA version 2.Registering your Domain reCAPTCHA version 2 Registering your Domain for Recaptcha
  4. Now you will able to see Site Key and Secret Key. Copy it Copy Site and Secret Key
  5. Paste it into the Simple Google reCAPTCHA.Insert your site and secret key
  6. Now you will able to see the I’m Not a Robot in the comment form. Now, this will help your blog to prevent spam comments.

3. Forget Spam Comment

A Forget Spam Comment is a plugin that is a light-weight solution to block spam comments. I am currently using this plugin in my blog to get rid of spam comments and you don’t need any other plugins like the Akismet Anti plugin.

Install the plugin and enjoy it where you don’t have to configure any settings. The plugin blocks the default wp-comments-post.php path.

Users have to scroll down to the comment section where they get a unique query hash string where bot can’t access that default URL directly. This only works with the default WordPress commenting system.

Also Read: How to Optimize WordPress Site

Get Rid of Spam Using WordPress Settings

We can get rid of spam tweaking the settings within WordPress. Let’s explore the possible setting area where we can use the tricks to stop the spammers. For this please visit WordPress Dashboard & Go to Settings > Discussion

Check Out: How To Remove URL Field From Comment form in GeneratePress?

1. Use of list of Blacklisted Words

Lots of comment contains the blacklisted words that are normally used by spammers. It is now easier to recognize and we can use those words and block them.

As it is said that, the Akismet Anti-spam plugin has already implemented those huge lists into the plugin so, it is not necessary to use the manual list but in case you need the list, you can find the huge list on Github. Check the Recommended Backlist Words.

  • Go to Settings > Discussion > Comment Blacklist
  • Copy the list and paste it
  • Save it.
Comment Blacklist Words

2. Restrict the Comment Moderation

Use the option “Comment must be manually approved” so that you can approve comments one by one. It will be time-consuming for you to approve if your blog receives lots of comments.

Comment Must be Manually approved

3. Users must be registered

Another way to avoid spam comments is to tweak the settings available on the Settings > Discussion. Turn on the settings “Users must be registered and logged in to comment“. This setting will make the spammer lazier than ever.

User must be registered

4. Disable Anonymous Comment

Turn on the settings “Comment author must fill out name and email” so that you can disable the Anonymous comments. It is pretty sure that you will prevent half of the spam comments on your website.

User must be registered

5. Close Comment After ‘X’ Days

You can also use the settings where you can automatically close the comments after certain days.  Use the settings “Automatically close comments on articles older than X days“.

Automatically closed your comments

6. Hold a comment in the Queue

You can even hold a comment in the queue section if the comment contains the links. When a comment contains any of the listed words in its content, name, URL, email, or IP address it will hold the comment for the moderation.

Hold the comment in the queue

Try Best: Best Resources and Tools

Conclusion

These are some of the possible ways to prevent and block spam comments on WordPress. If you have more ideas regarding this tutorial then please feel free to comment.

Share:

I am obsessed with WordPress and write articles about WordPress Speed Optimization, SEO, and Blogging. I mostly publish tutorials on GeneratePress, Astra, Kadence, and GenerateBlocks.

2 thoughts on “How To Prevent & Block Spam Comments On WordPress?”

  1. Hey Suraj

    I am trying to disallow any comment to show up in my wordpress dashboad that contains any kind of links.

    I think I should use the list of blacklisted words but I don’t need the entire text file.

    What particular blacklisted word will be of use for checking links in the body of the comment.

    Reply
    • Hi Shivam,
      I suggest you to use Forget Spam Comment plugin. It’s the best and I am using the same. It is a lightweight plugin to block all those spammy comments.
      Thanks

      Reply

Leave a Comment