Answer the question
In order to leave comments, you need to log in
How to prevent robots.txt from being viewed by other than search engines?
It is necessary to prohibit viewing robots.txt, in .htaccess register deny from all for it. But for certain search engines, access is allowed. Detect bots by HTTP_USER_AGENT, for example %{HTTP_USER_AGENT} !^yandex.*
How to create such a rule in .htaccess ? - forbidden for everyone (403), except for specific bots.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question