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 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.
But on the self-hosted blog, you need to install a plugin. So how to install Akismet Plugin
- Go to the plugin section
- Click on Add New
- Search for the plugin name (for this case, search Akismet Anti-spam Plugin)
- Click on
Install Now
andActivate
it. - After step 4, you need to set up your Akismet Account.
- Sign up to get the Akismet API key or if you already have a key then you can connect with API Key.
- Akismet offers a different plan. If you want to go for free, then Activate Personal Plan.
- Fill the form with required credentials and Go with $0/year and continue the service.
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.
- Follow the above method to install a plugin.
- Register a site for Site Key and Secret Key.
- Fill the required form as in the screenshot. We are using reCAPTCHA version 2.
- Now you will able to see Site Key and Secret Key. Copy it
- Paste it into the Simple Google reCAPTCHA.
- 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.
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.
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.
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.
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“.
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.
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.
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.
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