how to set rule not block googlebot ?

hi everyone, now i have a problem 😦 i have a one custom rules to block all country with response type "403 Default Cloudflare WAF block page" but not block Taiwan and Singapore"(not ip.geoip.country in {"TW" "SG"}) " so i have a problem because google bot also got blocked so what should i do?
4 Replies
Hard@Work
Hard@Work5mo ago
Do you only want to allow Googlebot, or also other verified bots?
iamtheflash
iamtheflashOP5mo ago
just googlebot
Hard@Work
Hard@Work5mo ago
This should™️ work?
(not ip.geoip.country in {"TW" "SG"}) or (not cf.bot_management.verified_bot) or (not http.user_agent contains "GoogleBot")
(not ip.geoip.country in {"TW" "SG"}) or (not cf.bot_management.verified_bot) or (not http.user_agent contains "GoogleBot")
Ok, let me see if I can get it right this time... Keep the original rule, then create a new Allow rule with the following content:
(cf.bot_management.verified_bot and http.user_agent contains "GoogleBot")
(cf.bot_management.verified_bot and http.user_agent contains "GoogleBot")
And I apologize for the original mixup Wouldn't the above block Verified Bots that don't have GoogleBot in their UA? Oh... Yeah, not sure if that is something you want Yeah, I read it as they only wanted GoogleBot to bypass the country-level block, but I can see how that question was ambiguous, mb
iamtheflash
iamtheflashOP5mo ago
i just want to block requests that don't come from singapore and taiwan. and i want to allow only google bot because i want to use robot.txt but when blocking the country it also block google bot. thank you very much to everyone for discussing and helping 🙂 :MeowHeartCloudflare:
Want results from more Discord servers?
Add your server