Title: Browser User Agent Block
Last modified: December 6, 2019

---

# Browser User Agent Block

 *  Resolved [johnvrijck](https://wordpress.org/support/users/johnvrijck/)
 * (@johnvrijck)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/browser-user-agent-block/)
 * Hi Wordfence team,
 * I’m trying to block a specific user agent of someone who is manually scraping
   my database, in the hopes not to prevent legitimate users from my site.
 * What precisely is the syntax to use in the Browser User Agent custom pattern 
   field?
    I want to block the following user agent (changed numbers due to GDPR)
 * Mozilla/6.0 (Windows NT 10.0; Win63; x64) AppleWebKit/523.31 (KHTML, like Gecko)
   Chrome/75.1.3454.96 Safari/512.24 OPR/12.0.3347.58
 * Placing this between asterisks doesn’t work. I just want to ban this entire user
   agent and not every user agent that contains one of these terms..
 * I tried this
    *OPR/12.0.3347.58 *Safari/512.24* *Mozilla/6.0 (Windows NT 10.0;
   Win63; x64) AppleWebKit/523.31 (KHTML, like Gecko) Chrome/75.1.3454.96 Safari/
   512.24 OPR/12.0.3347.58* *Mozilla/6.0 (Windows NT 10.0; Win63; x64) AppleWebKit/
   523.31 (KHTML, like Gecko) Chrome/75.1.3454.96 Safari/512.24 OPR/12.0.3347.58
 * etc.
    Maybe I need to escape this string?
 * Hopefully you can help me out!
 * Thanks!
    -  This topic was modified 6 years, 5 months ago by [johnvrijck](https://wordpress.org/support/users/johnvrijck/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [WFGerroald](https://wordpress.org/support/users/wfgerald/)
 * (@wfgerald)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/browser-user-agent-block/#post-12213056)
 * Hey [@johnvrijck](https://wordpress.org/support/users/johnvrijck/),
 * You can try blocking this part of the User-Agent:
 * Go the “Advanced Blocking” tab on the “Blocking” page.
 * Add *Mozilla/6.0* to the text field “User-Agent (browser) that matches”.
 * This is an old version of Mozilla from 2011 and it is highly unlikely that a 
   human visitor would be using such an old version of Mozilla.
 * Please let me know how it goes.
 * Thanks,
 * Gerroald
    -  This reply was modified 6 years, 5 months ago by [WFGerroald](https://wordpress.org/support/users/wfgerald/).
 *  Thread Starter [johnvrijck](https://wordpress.org/support/users/johnvrijck/)
 * (@johnvrijck)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/browser-user-agent-block/#post-12213719)
 * Hi Gerroald,
 * Thank you for the quick reply. Apologies for the confusion, I changed the numbers
   for GDPR purposes, but the real part of the user-agent was Mozilla/5.0, which
   unfortunately is very common.
 * I was just hoping that it was possible to block the entire user agent, since 
   it is unique enough to just block that 1 scraper.
 * I will try the other partial user agent parts that are less commons if there’s
   not an option to block the entire thing.
 * Thanks again!
 *  [wfdave](https://wordpress.org/support/users/wfdave/)
 * (@wfdave)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/browser-user-agent-block/#post-12215939)
 * Hi [@johnvrijck](https://wordpress.org/support/users/johnvrijck/),
 * I’d recommend simply IP banning or rate-limiting certain pages you don’t want
   scraped.
 * Changing the user-agent is pretty simple, and you run the risk of blocking out
   users that may share the same user-agent.
 * Dave
 *  [WFGerroald](https://wordpress.org/support/users/wfgerald/)
 * (@wfgerald)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/browser-user-agent-block/#post-12286521)
 * Hi [@johnvrijck](https://wordpress.org/support/users/johnvrijck/),
 * We haven’t heard back from you in a while, so I’ve gone ahead and marked this
   thread as resolved.
 * Please feel free to open another thread if you’re still having issues with Wordfence.
 * Thanks,
 * Gerroald

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Browser User Agent Block’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [WFGerroald](https://wordpress.org/support/users/wfgerald/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/browser-user-agent-block/#post-12286521)
 * Status: resolved