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

**URL:** <https://community.gravityforms.com/t/how-to-block-browser-type-bot-for-spam-incoming-messages/10510>\
**Category:** Get Help\
**Tags:** gform\_entry\_is\_spam, spam, gravity-wiz\
**Created:** [August 5, 2021, 2:24pm UTC](https://community.gravityforms.com/t/how-to-block-browser-type-bot-for-spam-incoming-messages/10510 "2021-08-05T14:24:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![user6068b92544471195](https://avatars.discourse-cdn.com/v4/letter/u/2acd7d/32.png) [@user6068b92544471195](https://community.gravityforms.com/u/user6068b92544471195)\
**Post date:** [August 5, 2021, 2:24pm UTC](https://community.gravityforms.com/t/how-to-block-browser-type-bot-for-spam-incoming-messages/10510/1 "2021-08-05T14:24:11Z")

</div>

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](https://www.techlicious.com/blog/fake-copyright-infringement-warnings-used-to-spread-ransomware/)

browser type

- Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)
- Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)
- Mozilla/5.0 (compatible; BLEXBot/1.0; +http://webmeup-crawler.com/)
- Mozilla/5.0 (Windows NT 6.0; rv:46.0) Gecko/20100101 Firefox/46.0

---

<div class="post-metadata">

**Author:** ![samuel](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/samuel/32/2539_2.png) [@samuel](https://community.gravityforms.com/u/samuel)\
**Post date:** [August 5, 2021, 5:21pm UTC](https://community.gravityforms.com/t/how-to-block-browser-type-bot-for-spam-incoming-messages/10510/2 "2021-08-05T17:21:54Z")

</div>

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](https://gravitywiz.com/documentation/gravity-forms-blocklist/) to prevent submission of the form if that keyword is entered in a field on the form.

> **[Gravity Forms Blocklist - Blacklist and Block IP | Gravity Wiz](https://gravitywiz.com/documentation/gravity-forms-blocklist/)**
>
> Use Gravity Forms Blocklist to validate fields against Disallowed Comment Keys, and prevent submissions that include blocked phrases or IPs.

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [August 5, 2021, 5:25pm UTC](https://community.gravityforms.com/t/how-to-block-browser-type-bot-for-spam-incoming-messages/10510/3 "2021-08-05T17:25:30Z")

</div>

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.)

> **[gform\_entry\_is\_spam](https://docs.gravityforms.com/gform_entry_is_spam/)**
>
> The gform\_entry\_is\_spam filter is used to mark entries as spam. This filter is used in the Gravity Forms plugin and can be applied to a single form or all forms.

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

> **[We’re Now Maintaining the Gravity Forms Zero Spam Plugin](https://www.gravitykit.com/gravity-forms-spam-plugin/)**
>
> Looking for simple form spam plugin for WordPress that prevents Gravity Forms spam? Here's the story about how we adopted the best spam blocker plugin.

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

---

<div class="post-metadata">

**Author:** ![user6068b92544471195](https://avatars.discourse-cdn.com/v4/letter/u/2acd7d/32.png) [@user6068b92544471195](https://community.gravityforms.com/u/user6068b92544471195)\
**Post date:** [August 5, 2021, 6:11pm UTC](https://community.gravityforms.com/t/how-to-block-browser-type-bot-for-spam-incoming-messages/10510/4 "2021-08-05T18:11:00Z")

</div>

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  
843-608-1476  
[andrew@andrewdonnan.com](mailto:andrew@andrewdonnan.com)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [September 4, 2021, 6:11pm UTC](https://community.gravityforms.com/t/how-to-block-browser-type-bot-for-spam-incoming-messages/10510/5 "2021-09-04T18:11:46Z")

</div>

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