block_ai_crawlers.conf
· 487 B · Text
Raw
(blockAiCrawlers) {
@blockAiCrawlers {
header_regexp User-Agent "(?i)(^|\W)(Bytespider|CCBot|Diffbot|FacebookBot|Google-Extended|GPTBot|omgili|anthropic-ai|Claude-Web|ClaudeBot|cohere-ai)($|\W)"
}
handle @blockAiCrawlers {
abort
}
}
# Usage:
# 1. Place this file next to your Caddyfile
# 2. Edit your Caddyfile as in the example below
#
# ```
# import block_ai_crawlers.conf
#
# www.mywebsite.com {
# import blockAiCrawlers
# reverse_proxy * localhost:3000
# }
# ```
| 1 | (blockAiCrawlers) { |
| 2 | @blockAiCrawlers { |
| 3 | header_regexp User-Agent "(?i)(^|\W)(Bytespider|CCBot|Diffbot|FacebookBot|Google-Extended|GPTBot|omgili|anthropic-ai|Claude-Web|ClaudeBot|cohere-ai)($|\W)" |
| 4 | } |
| 5 | handle @blockAiCrawlers { |
| 6 | abort |
| 7 | } |
| 8 | } |
| 9 | |
| 10 | # Usage: |
| 11 | # 1. Place this file next to your Caddyfile |
| 12 | # 2. Edit your Caddyfile as in the example below |
| 13 | # |
| 14 | # ``` |
| 15 | # import block_ai_crawlers.conf |
| 16 | # |
| 17 | # www.mywebsite.com { |
| 18 | # import blockAiCrawlers |
| 19 | # reverse_proxy * localhost:3000 |
| 20 | # } |
| 21 | # ``` |