Re:Llms.txt
by otherme123 on Wednesday September 04, 2024 @02:25AM
(#41442479)
In your nginx.conf, http block, add
include /etc/nginx/useragent.rules;
In /etc/nginx/useragent.rules map $http_user_agent $badagent {
default 0;
~facebook 1;
[...]
~PerplexityBot 1;
}
In your site.conf, server block, add if ($badagent) {
return 444;
}
Re:Llms.txt
by nilsherzig on Wednesday September 04, 2024 @04:15AM
(#41443123)
Anyone knows of a crowd sourced list of these user agents? With the current state of AI startups it will be hard to keep this up to date by myself
Ah, nice, way better than my string of ifs.
Ideally i would like these crawlers to access /robots.txt but nothing else.
Only if they ignore robots.txt the access rules will stop them.
You can probably write a specific location block for robots.txt which will have a higher priority.
See also https://stackoverflow.com/questions/5238377/nginx-location-p...
[1] https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#ngin...
[2] https://blog.cloudflare.com/declaring-your-aindependence-blo...