Blocking All Countries Except UK and Known Bots

I would like to javascript challenge all visitors to a site except visitors from the UK and known bots

Will this work:

(ip.geoip.country ne "GB")

That looks right. Allow always takes precedence over all others, plus it’s your first rule.

Just keep in mind what a Known Bot is, as it doesn’t include every bot you might want to crawl your site. For example, I like FastOrSlow, but it’s not considered a Known Bot.

The sort-of-up-to-date list is here, and it may include bots you don’t want crawling your site.

2 Likes

Great, I’m only really concerned with google and bing tbh, will monitor how it goes.
Glad to know I’m on the right track!
Thanks

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.