tell me the script for catching bots on the site
Closed due to the fact that the essence of the question is not clear to the participants of the Grundy , Vladimir Martyanov , MasterAlex , Igor , Dmitriy Simushev Nov 30 '16 at 15:06 .
Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .
- Do you mean bots that make fake orders on land? - G.Denis
2 answers
If you are interested in catching Yandex search robots, Google or other search engines, then you can check the User Agent. For more information about the used User Agent can be found on the off. search engine pages.
- The situation is such that I pour traffic on the land and I would like the bots to not be able to enter my land. - Samvel
- 2@Samvel add complete information to your question, otherwise it will most likely be closed. - Denis
If you want search engine bots to not index your site, you should put a robots.txt file in the root directory of the site with the following content:
User-agent: * Disallow: / The first parameter indicates that the rule applies to all search bots.
The second parameter indicates that indexing is prohibited for the entire site.
You can also manage specific search engines:
User-agent: Yandex User-agent: Googlebot ...