Spam comments are a common nuisance for WordPress site owners. They can clutter your comment sections, harm your site’s credibility, and even affect your search engine rankings. Fortunately, there are several effective strategies to combat spam and keep your WordPress comments clean and relevant. This blog will explore various methods to stop spam in WordPress comments, from built-in features to advanced plugins.
1. Enable Comment Moderation
One of the simplest ways to control spam is by enabling comment moderation. This allows you to review and approve comments before they appear on your site.
How to Enable Comment Moderation:
1. Go to Settings > Discussion in your WordPress dashboard.
2. Check the box next to “Comment must be manually approved.”
3. Optionally, you can also check “Comment author must have a previously approved comment” to allow trusted users to bypass moderation.
2. Use Anti-Spam Plugins
Anti-spam plugins are designed to automatically detect and filter out spam comments. Here are some popular options:
Akismet
Akismet is one of the most widely used anti-spam plugins for WordPress. It automatically checks comments against its global database of spam.
• Installation: Go to Plugins > Add New, search for Akismet, install, and activate it.
• Configuration: You’ll need an API key from the Akismet website to activate the plugin.
CleanTalk
CleanTalk is another powerful anti-spam plugin that uses advanced algorithms to block spam comments.
• Installation: Go to Plugins > Add New, search for CleanTalk, install, and activate it.
• Configuration: Register on the CleanTalk website to get an access key and enter it in the plugin settings.
3. Implement CAPTCHA
CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) helps prevent automated spam by requiring users to complete a simple test.
How to Add CAPTCHA:
1. Install a CAPTCHA Plugin: Popular options include Google reCAPTCHA and WPForms.
2. Configure the Plugin: Follow the plugin’s instructions to set up CAPTCHA on your comment forms.
4. Disable Comments on Old Posts
Spam bots often target older posts. Disabling comments on these posts can reduce spam significantly.
How to Disable Comments on Old Posts:
1. Go to Settings > Discussion in your WordPress dashboard.
2. Check the box next to “Automatically close comments on articles older than X days” and set the desired number of days.
5. Use a Web Application Firewall (WAF)
A Web Application Firewall (WAF) can provide an additional layer of security by blocking malicious traffic before it reaches your site.
Recommended WAF Services:
• Sucuri: Offers comprehensive security features, including a WAF.
• Cloudflare: Provides a free WAF with basic protection and paid plans for advanced features.
6. Restrict Comment Privileges
Limiting who can comment on your site can also help reduce spam.
How to Restrict Comment Privileges:
1. Go to Settings > Discussion in your WordPress dashboard.
2. Check the box next to “Users must be registered and logged in to comment.”
7. Use Honeypot Technique
The honeypot technique involves adding a hidden field to your comment form that only bots will fill out. If this field is filled, the comment is flagged as spam.
How to Implement Honeypot:
1. Install a Honeypot Plugin: Popular options include WP Spam Fighter and Antispam Bee.
2. Activate and Configure: Follow the plugin’s instructions to set up the honeypot field.
8. Blocklist Keywords
Creating a list of common spam keywords can help automatically filter out spam comments.
How to Blocklist Keywords:
1. Go to Settings > Discussion in your WordPress dashboard.
2. Scroll to the Comment Moderation section and add keywords to the “Disallowed Comment Keys” box.
9. Limit Links in Comments
Spam comments often contain multiple links. Limiting the number of links allowed in comments can reduce spam.
How to Limit Links:
1. Go to Settings > Discussion in your WordPress dashboard.
2. Set the desired number in the “Comment Moderation” section under “Hold a comment in the queue if it contains X or more links.”
10. Disable HTML in Comments
Disabling HTML in comments can prevent spammers from embedding malicious links and scripts.
How to Disable HTML:
1. Add Custom Code: You can add custom code to your theme’s functions.php file to strip HTML tags from comments.
2. Use a Plugin: Plugins like Disable Comments can help manage this without coding.
11. Use Third-Party Comment Systems
Switching to a third-party comment system like Disqus or Facebook Comments can help reduce spam, as these platforms have their own spam filtering mechanisms.
How to Implement Third-Party Comment Systems:
1. Install the Plugin: Go to Plugins > Add New, search for the desired comment system, install, and activate it.
2. Configure the Plugin: Follow the plugin’s instructions to integrate the comment system with your site.
12. Regularly Clean Up Spam Comments
Regularly cleaning up spam comments can help maintain your site’s performance and prevent spam from accumulating.
How to Clean Up Spam:
1. Go to Comments in your WordPress dashboard.
2. Select Spam from the comment filter options.
3. Bulk Delete: Select all spam comments and delete them in bulk.
Spam comments can be a significant issue for WordPress site owners, but with the right strategies and tools, you can effectively combat and reduce spam. By enabling comment moderation, using anti-spam plugins, implementing CAPTCHA, and employing other techniques discussed in this blog, you can keep your comment sections clean and maintain your site’s credibility.