Created
July 17, 2025 19:47
-
-
Save artlung/67acf245d9eda15d41c18275a2ebd738 to your computer and use it in GitHub Desktop.
.htaccess llm blocking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://serverfault.com/questions/1162651/blocking-bots-with-apache-htaccess | |
RewriteCond %{HTTP_USER_AGENT} ^.*(AdsBot-Google|Amazonbot|anthropic-ai|Applebot|Applebot-Extended|AwarioRssBot|AwarioSmartBot|Bytespider|CCBot|ChatGPT|ChatGPT-User|Claude-Web|ClaudeBot|cohere-ai|DataForSeoBot|Diffbot|GPTBot|ImagesiftBot|magpie-rawler|omgili|Omgilibot|peer39_crawler|PerplexityBot|YouBot|AhrefsBot|Barkrowler|SemrushBot|DotBot).*$ [NC] | |
# https://www.jwz.org/blog/2025/05/user-agent-blocking/#comment-259200 | |
RewriteRule .* - [F,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment