Dealing with Spam Comments

Ujjwal ShresthaUjjwal Shrestha
3 min read

Dealing with spam comments on a WordPress site is a common issue, but there are several effective strategies and tools to minimize and manage spam. Some the methods I tried which can effectively deal with spam comments:

1. Use Anti-Spam Plugins

There are several plugins specifically designed to combat spam. Some popular ones include:

  • Akismet Anti-Spam: This is one of the most popular and effective spam prevention plugins. It automatically filters out spam comments.

  • Antispam Bee: Another powerful plugin that is free and does not require user registration.

  • Wordfence Security: Primarily a security plugin, but it also includes features to combat spam.

My thoughts: The "Akismet Anti-Spam" plugin didn't work for me, however "Antispam Bee" plugin was pretty impressive, worked like a charm.

2. Use CAPTCHA or reCAPTCHA

Adding a CAPTCHA or reCAPTCHA to your comment forms can significantly reduce spam. You can use plugins like Google Captcha (reCAPTCHA) or Simple Google reCAPTCHA.

My thoughts: This can work but in order for this to work, we must add captcha or recaptcha on our posts comments which can be tricky.

3. Blacklist Keywords

You can add common spam keywords to a blacklist:

  1. Go to Settings > Discussion.

  2. Add spammy words or URLs to the "Comment Blacklist" section.

My thoughts: I thought about trying this method, but the keywords on the spam comments are not specific and as a result would not block all the spam comments

4. Disable Trackbacks and Pingbacks

Trackbacks and pingbacks can also be used to spam your site. To disable them:

  1. Go to Settings > Discussion.

  2. Uncheck the box for "Allow link notifications from other blogs (pingbacks and trackbacks) on new articles".

Spammers often include links in their comments. You can limit the number of links allowed in comments:

  1. Go to Settings > Discussion.

  2. Set the "Comment Moderation" field to hold any comments with more than a specified number of links.

My thoughts: I noticed that the spam comments have a tendency to include multiple links in their comments, so we could write a logic to avoid saving the comments having more than one link, which would avoid spam comments.

6. Block IP Addresses

If you notice a lot of spam coming from specific IP addresses, you can block them:

  1. Go to Settings > Discussion.

  2. Add the IP addresses to the "Comment Blacklist" section.

My thoughts: If there were only few spam comments, it would work but as last time there were approximately 15k spam comments from different spam-user name, blocking every ip address would be impossible

Conclusion

By implementing these strategies, I could significantly reduce the amount of spam comments on my WordPress site.

0
Subscribe to my newsletter

Read articles from Ujjwal Shrestha directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ujjwal Shrestha
Ujjwal Shrestha

Hi! My name is Ujjwal Shrestha and I'm a Junior PHP/WordPress developer. Learning and gaining experience in the field, I have a strong track record of delivering clean, high-quality solutions for my clients, and have the skills and expertise to take on projects of any size and complexity.