Challenge empty User Agent - free tier

Greetings CF experts. I would like to block or challenge requests with an empty user agent. If I create a User Agent Blocking Rule and leave the User Agent field blank, I get an error message and the rule does not save. I can enter ‘None’ or ‘Empty’ but I kinda think that won’t do what I want. So, is there a way for a notorious cheapskate like me on the free tier to block or challenge an empty user agent?

You can create a firewall rule to do the same thing,

(http.user_agent eq "")

On paid plans you can enable the managed rule 100001.

1 Like

Prompt informative response very much appreciated, Michael. This is what I love about the Cloudflare Community - kind, knowledgeable people, no snarkiness or trolling. I can’t find a way to enter your suggestion using the firewall rule wizard, but using the expression editor - looks like it will work perfectly. Thanks again.

1 Like

The same way


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