The Rate module comes with built-in bot detection. In this video, I will show you how to enable that to protect your site from unwanted ratings.

The Rate module can detect bots in three ways: Based on user agent string, by using a threshold and by looking up the IP address in the BotScout.com database. As of this video, if you'd like to filter by user agent string, you'll need to manually enter those into the "rate_bot_agent" table of your database. Since manually editing your database is not always safe, or even possible, we'll just take a look at how to configure thresholds and how to utilize BotScout.com.

  • Go to "Structure => Rate Widgets => Settings tab" (admin/structure/rate/settings)

Bot Detection

  • 1 minute threshold: 10 (This setting will depend on your site. Choosing a lower threshold will identify more bots and will identify them faster, but you always have to make sure that real users wont be blocked. So, if users are rating content frequently on your site, you might set this higher.)
  • 1 hour threshold: 50 (This is the same idea as the 1 minute threshold.)

We could stop here, but lets go ahead and request a BotScout key to utilize that service as well.

  • Request a Key at BotScout
    • Enter your information, then check your email.
  • Go back to "Structure => Rate Widgets => Settings tab" (admin/structure/rate/settings)
  • BotScout.com API key: (Enter your key)

That's all there is to it! You're all set up to block those pesky bots!