Block Unwanted Requests Examples
With Traffic Policy, you can block unwanted requests to your endpoints. This page demonstrates a few example rules that do so.
See the following Traffic Policy action docs for more information:
How do I deny traffic from Tor?
This rule uses the connection variables available in IP Intelligence to block Tor exit node IPs.
Loading…
How do I deny traffic from bots and crawlers with a robots.txt
?
This rule returns a custom response with a robots.txt
file to deny search engine or AI crawlers on all paths.
Loading…
You can extend this example to create specific rules for crawlers based on their user agent strings, like ChatGPT-User
and GPTBot
.
Loading…
How do I block traffic from bots and crawlers by user agent?
You can also take action on incoming requests that contain specific strings in the req.user_agent
request variable.
Loading…
You can expand the expression to include additional user agents by extending the (chatgpt-user|gptbot)
section of the regular expression.
Loading…
How do I block traffic from bots and crawlers by IP Address?
You can also use IP Intelligence variables to block AI Bots by IP Address.
Loading…