I Want To Block All Traffic Coming From "UC Browser"

Hi Cloudflare Community!

I have a website that that is getting an immense amount of traffic on a “Category” page that is not indexed on Google, the entire traffic is coming from UC browser, and this traffic is from India. I cannot block per IP basis, because the range is huge, and everything just keeps changing. This fake traffic on the non-index category page increased in just one day (Traffic on the URL spiked from 2000 to 14000), so I am pretty sure it’s bot traffic.

I want to block all the traffic from the UC browser, can some give me a rule that I can on the Cloudflare firewall. The only thing that is common about this bot traffic is the UC browser. Thanks a lot!

Thanks,
Ahtesham.

from fast googling it seems like the uc browser user agent has "ucbrowser’ in it

go to firewall->user agent blocking->create->challenge->user agent: ucbrowser

I would first start with challenge instead of blocking has it will give you more idea about the attack type, if the requests will stop hitting your origin is good sign of attack, also in case more browsers\legitime users will have this string in the user agent they will still be able to access your site

2 Likes

Actually, User Agent Blocking requires a specific user agent. It does not work as a wildcard.

@ahtesham.quraishi088 would need to add a Firewall Rule, as this includes the operator “contains”:

You can try this:

Or edit the expression above to include the lower() function to lowercase the UA before matching:

(lower(http.user_agent) contains "ucbrowser") then JS Challenge/Challenge/Block etc.

As @boynet2 suggested, I’d start with Challenge, then move to Block if needed.

3 Likes

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