How to Block ALL Bots except Google

Please tell me How to Block ALL Bots except Google.

You can use cf.client.bot in a firewall rule, however that would only block the crawlers listed at Firewall Rules FAQ · Cloudflare Firewall Rules docs and you would need to exclude Google manually.

Apart from that it is pretty difficult to impossible to block “all” of them. It would require a lot of manual tweaking and even then you wouldnt have a guarantee.

You can check out Show bad-mannered bots the door to 403 | by .... | Binary Passion | Medium for starters.

1 Like

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