Prevent comment spam

/ / prevent comment spam

Updated: 2017-03-01

The importance of preventing comment spam

Comments are often a great way to build community and readership. Sadly, they are often abused by spammers, many of whom use scripts to generate and post spam.

It is very important to deal with this spam as it can be harmful to your website in many ways, such as

  • Low quality content on some parts of the website can impact the whole site’s rankings
  • Spam can distract and annoy your website visitors
  • Google may remove or demote pages overrun with user-generated spam
  • Content posted by spammers may lead to malicious websites that can negatively effect your users
  • Unintended traffic from unrelated content can raise the costs of running the website

Ways to prevent comment spam

There are many ways to prevent comment spam. First thing to consider is whether you want to allow visitors to comment at all. If it does not add much value to the visitors, or if you have no time or desire to monitor the comments, then consider turning them off.

If you have decided that you want to allow users to post comments on your website, then there are ways to prevent spam, some of these methods include:

  • Add comment moderation, meaning that no comment will appear until they are reviewed and approved
  • Automatically add rel="nofollow" tags to all <a> href attributes - this will make your website a far less lucrative target to spammers
  • Allow the community to assist you by flagging spam
  • Create blacklists for spammy users and IP addresses
  • Require users to validate a real email address before allowing them to comment
  • Use anti-spam tools, such as reCAPTCHA. Most visitors hate them, but they may be necessary to help combat comment spam