Create .htaccess

.htaccess rule to block user-agents
This commit is contained in:
Erdem 2025-01-06 02:56:07 +03:00 committed by GitHub
parent ca8620e28b
commit 0777befd36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

6
.htaccess Normal file
View file

@ -0,0 +1,6 @@
# Ai bots don't respect robots.txt files. You can use the following .htaccess rule to block them.
# Use user-agent names from robots.txt file in this repository to edit the following rule. Replace or add bot names with ones that cause your website trouble.
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^.*(ClaudeBot|NBot|GPTBot|).*$ [NC]
RewriteRule .* - [F,L]