(EDITED)
Hey @lstrand,
I recommend against blocking User-Agents. You may end up blocking legitimate website visitors using the same User-Agent. Instead, block the offending IPs.
If you still need to block multiple User-Agents (i.e., cannot identify the specific, offending IPs), then use the Boolean operator “or” to separate each User-Agent.
So, in your case, you would use:
*Browser/9*.* or *Browser/8*.* or *Browser/7*.*
If the above doesn’t work, you will need to create a separate blocking rule for each User-Agent.
Additional, Useful Information: How to Block Bot Traffic from Menacing Sites
Last, you can always test your set-up by temporarily blocking a couple of User-Agents you’re using at this time, then visiting your own website(s). Make sure you always leave open one of your User-Agents so you can log back into your website (backend) to undo your test parameters.
Hope this helps.
Cheerio!
Hi @lstrand, thanks for reaching out!
You can’t separate User-Agent by commas or “OR” operators so each one will require its own rule, but indeed exercise caution that you aren’t blocking legitimate bots or users of your site when doing so.
The examples in the field possibly suggest that multiples can be added whereas they’re just there to show potential input values. I’ve mentioned this to our team so that our documentation can be modified in the near future to clarify this: https://www.wordfence.com/help/blocking/
Thanks,
Peter.
For clarification, both of these would work?
*Browser/9*.*, *Browser/8*.*, *Browser/7*.*
*Browser/9*.* | *Browser/8*.* | *Browser/7*.*
Hi @lstrand,
Based on @wfpeter’s input, no. Neither one will work.
You need to create a separate blocking rule for each User-Agent.
Apologies for any confusion.
Thank you.