Answer the question
In order to leave comments, you need to log in
How to block all possible search bots?
There is a task to block access to indexing by all possible search engines and their spiders/bots.
I want to do it the right way.
I'm currently thinking about something like this:
$ua = $_SERVER['HTTP_USER_AGENT'];
if(mb_strpos($ua, "bot") || mb_strpos($ua, "crawler") || mb_strpos($ua, "spider")){
header("Location: some.url");
}
else{
...
Содержимое страницы
...
}
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