How to block browser type "bot" for spam incoming messages?

Our form has honeypot turned on and recaptcha, but one type of spam message is still sneaking through. I noticed that its browser type has the word bot in it, which I assume is something I could automatically block from ever submitting?
Type of spam message: Fake Copyright Infringement Warnings Used to Spread Ransomware - Techlicious

browser type

  • Mozilla/5.0 (compatible; bingbot/2.0; +
  • Mozilla/5.0 (compatible; AhrefsBot/7.0; +
  • Mozilla/5.0 (compatible; BLEXBot/1.0; +
  • Mozilla/5.0 (Windows NT 6.0; rv:46.0) Gecko/20100101 Firefox/46.0

Hi Andrew,

If you’re able to identify a keyword in all the spam messages you’ve received, then you can use our GP Blocklist Perk to prevent submission of the form if that keyword is entered in a field on the form.

Hi Andrew. It’s strange that those crawlers with the name ‘bot’ in the user agent are actually submitting forms on the site. Maybe those are being spoofed?

You could use the gform_entry_is_spam filter to mark an entry as spam, based on the user agent (you would need to write your own check for the user agent.)

There are also programs which do a better job than we could in PHP. I like this one:

If you need help with the gform_entry_is_spam filter, please let us know. Thank you.

Thank you, I will take a look at this. I also realize that I didn’t have the askimet and recaptcha 3 extensions up and running on this website, so maybe that will help in the future. I do have a hidden recaptcha 2 running alongside the 3. I don’t know if that will cause issues or not.

Andrew Donnan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.