当前位置:网站首页>block yandex bot
block yandex bot
2022-07-28 05:23:00 【oHuangBing】
yandex bot yes Yandex Search engine crawler . stay yandex bot user agent In this article , I summed up all yandexbot Of User-agent, Through that article , We can see some Yandexbot comply with robots.txt agreement , Some do not comply robots.txt agreement .
We need to block yandexbot(block yandex bot) Can pass robots.txt and IP The way to shield , Let's talk about it separately .
adopt robots.txt shielding yandexbot
yandex bot user agent In this article, only abide by robots.txt The crawler of the agreement, we can pass robots.txt Protocol to shield , If we don't comply, we can't pass robots.txt Protocol to shield .
for example , We need to block YandexBot/3.0 This Reptiles ,robots.txt It is written as follows :
User-agent: YandexBot
Disallow: /
This prohibits all YandexBot Grab any page of our website , Blockade reached yandex bot(block yandex bot) Purpose .
If we just want some pages not to be YandexBot Grab , We can write this way :
User-agent: Yandex
Allow: /
Disallow: /private/user-info
We allow YandexBot Visit all pages , But the last one forbids access /private/user-info page , That's what we're trying to achieve .
Some more Yandex bot Do not abide by robots.txt agreement , So we need to go through IP perhaps IP The address segment is shielded .
adopt IP Address to shield Yandex bot
We go through YandexBot The page can find out the specific Yandex bot Of IP Address , for example :YandexMobileBot/3.0 Do not abide by robots.txt agreement , So we need to pass shielding IP The way to shield Yandex bot, Displayed through this page IP , Let's choose any one IP As an example :95.108.213.6.
If our front-end server ( for example :Nginx,Apache) Running Linux We can directly enter the following command to mask Yandex bot:
sudo iptables -A INPUT -s 95.108.213.6 -j DROP
such YandexMobileBot/3.0 We can't capture the content on our website .
We can input one by one IP Address , Shield through firewall .
summary
shielding Yandex bot We used two methods , One is : adopt robots.txt To shield , The other is : adopt IP Address to shield , If Yandexbot Non compliance rotbots.txt agreement , We will use IP Address to shield .
Yandex bot yes Yandex Search engine crawler , If we block , It may bring us losses in traffic , Please consider whether it is necessary to shield Yandex Bot, Make another decision .
边栏推荐
- FreeRTOS personal notes - task notification
- 多御安全浏览器将改进安全模式,让用户浏览更安全
- [learning record] data enhancement 1
- HashSet add
- Tips for using swiper (1)
- Flask Development & get/post request
- Message forwarding mechanism -- save your program from crashing
- Dell remote control card uses ipmitools to set IPMI
- MySQL(5)
- 11. < tag dynamic programming and subsequence, subarray> lt.115. Different subsequences + Lt. 583. Deletion of two strings DBC
猜你喜欢
随机推荐
C language: realize the simple function of address book through structure
C language: addition and deletion of linked list in structure
如何在 FastReport VCL 中通过 Outlook 发送和接收报告?
【ARXIV2204】Vision Transformers for Single Image Dehazing
RT based_ Distributed wireless temperature monitoring system based on thread
MySQL basic query
Antd setfieldsvalue warning problem cannot use 'setfieldsvalue' until you use 'getfielddecorator' or
在ruoyi生成的对应数据库的代码 之后我该怎么做才能做出下边图片的样子
【ARIXV2204】Neighborhood attention transformer
Performance test classification
MySQL(5)
Handling of web page image loading errors
Transformer -- Analysis and application of attention model
测试开发---自动化测试中的UI测试
RT_ Use of thread mailbox
How practical is the struct module? Learn a knowledge point immediately
Keil Chinese garbled code solution
Interpreting the source code of cfrunloopref
RT_ Use of thread message queue
Non functional test



![[slam] lvi-sam analysis - Overview](/img/66/f15f6f574807b9a783e9321c71d422.png)





