Firewall Rules With User Agents


I have added a few rules to limit access to my landing page and block bots, however, it seems that the rules don’t really work and still blocking legit requests that shouldn’t be blocked.

Any idea what am I doing wrong?

For some reason I couldn’t upload screenshot of the rule (new users can’t uplod more than 1 media LOL).

For troubleshooting, I would break that into two rules.

I’m not confident that your “does not contain” syntax is correct. I think this has come up before, but I can’t find it. It might be that only Biz and Ent plans let you use regex. Fortunately, using the Expression Editor, it’s pretty easy to string together a bunch of OR statements together:
( eq "test") and ((http.user_agent contains "DotBot") or (http.user_agent contains "Seznam"))

1 Like

You are right - “Does not contain” and “Contains” test a single value, not a regular expression. Better to change those to “does not contain” with single values - best to create in the editor to make sure the correct precedence is used.


The interesting part that it does work now and sometimes it doesn’t… hard to understand and why it’s so inconsistent. I don’t want to complain as I’m using the free plan but wonder what’s the best way actually to confirm if it’s working properly.

The reason why I do that is to block bots to avoid unnecessary traffic from bots navigating to the landing pages from paid advertising.

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