Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
There are quite a few robots that take robots.txt into account, and new ones are appearing. How do you at least let them know that they are denied access? You just should not put links to secret sections of the site in robots.txt - if there are no incoming links to them, then decent robots will not climb there even without robots.txt.
You can try by User-Agent, but it's easy to fake it:
# User-Agent большинства роботов содержит токен, заканчивающийся на "bot"
RewriteCond %{HTTP_USER_AGENT} !bot\b [NC]
# Дополнительно перечисляем характерные участки User-Agent, не удовлетворяющих предыдущему условию
# (список можно продолжить...)
RewriteCond %{HTTP_USER_AGENT} !\b(yahoo\.com|baidu\.com)/
## или так
#RewriteCond %{HTTP_USER_AGENT} !\b(Slurp|Baiduspider)\b
RewriteRule ^robots\.txt$ - [R=404]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question