Allow Know Bots

Hi,

I have the following code that blocks countries in a rule:

(ip.geoip.country eq “AF”) or (ip.geoip.country eq “AL”) or (ip.geoip.country eq “AR”) or (ip.geoip.country eq “IO”) or (ip.geoip.country eq “CM”) or (ip.geoip.country eq “CU”) or (ip.geoip.country eq “ER”) or (ip.geoip.country eq “GH”) or (ip.geoip.country eq “GT”) or (ip.geoip.country eq “IR”) or (ip.geoip.country eq “IQ”) or (ip.geoip.country eq “KG”) or (ip.geoip.country eq “LY”) or (ip.geoip.country eq “YT”) or (ip.geoip.country eq “MA”) or (ip.geoip.country eq “NG”) or (ip.geoip.country eq “KP”) or (ip.geoip.country eq “NO”) or (ip.geoip.country eq “PK”) or (ip.geoip.country eq “RE”) or (ip.geoip.country eq “SS”) or (ip.geoip.country eq “SD”) or (ip.geoip.country eq “SY”) or (ip.geoip.country eq “AE”) or (ip.geoip.country eq “UY”) or (ip.geoip.country eq “VN”)

How should look in order to block these countries, but allow Googlebot and other know bots from these countries.

Should it look:

(ip.geoip.country eq “AF” and not cf.client.bot) or (ip.geoip.country eq “AL” and not cf.client.bot) or (ip.geoip.country eq “AR” and not cf.client.bot) or (ip.geoip.country eq “IO” and not cf.client.bot) or (ip.geoip.country eq “CM” and not cf.client.bot) or (ip.geoip.country eq “CU” and not cf.client.bot) or (ip.geoip.country eq “ER” and not cf.client.bot) or (ip.geoip.country eq “GH” and not cf.client.bot) or (ip.geoip.country eq “GT” and not cf.client.bot) or (ip.geoip.country eq “IR” and not cf.client.bot) or (ip.geoip.country eq “IQ” and not cf.client.bot) or (ip.geoip.country eq “KG” and not cf.client.bot) or (ip.geoip.country eq “LY” and not cf.client.bot) or (ip.geoip.country eq “YT” and not cf.client.bot) or (ip.geoip.country eq “MA” and not cf.client.bot) or (ip.geoip.country eq “NG” and not cf.client.bot) or (ip.geoip.country eq “KP” and not cf.client.bot) or (ip.geoip.country eq “NO” and not cf.client.bot) or (ip.geoip.country eq “PK” and not cf.client.bot) or (ip.geoip.country eq “RE” and not cf.client.bot) or (ip.geoip.country eq “SS” and not cf.client.bot) or (ip.geoip.country eq “SD” and not cf.client.bot) or (ip.geoip.country eq “SY” and not cf.client.bot) or (ip.geoip.country eq “AE” and not cf.client.bot) or (ip.geoip.country eq “UY” and not cf.client.bot) or (ip.geoip.country eq “VN” and not cf.client.bot)

Something else?

Kind Regards

(ip.geoip.country in {"AE" "AF" "AL" "AR" "CM" "CU" "ER" "GH" "GT" "IO" "IQ" "IR" "KG" "KP" "LY" "MA" "NG" "NO" "PK" "RE" "SD" "SS" "SY" "UY" "VN" "YT"} and not cf.client.bot)
1 Like

Thank you very much!

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