野狼SEO团队,纯白帽SEO倡导者!16年专注网站优化服务,支持月付!  [点击查看公司宣传册]
专注纯白帽、整站正规优化
让你排名上升,流量暴涨!
网站优化服务电话
0371-56789-390
详细内容
当前位置:首页 > SEO知识 > 详情

国内外各个搜索蜘蛛爬虫User-Agent,以及封禁的办法汇总

发布时间:2022-07-09 来源:本站原创 作者:野狼SEO团队 阅读:647

国内外有很多的网络蜘蛛爬虫,他们在进行爬行的时候会携带自己的user-agent,我们可以通过这个来判断蜘蛛,从而限制蜘蛛对于网站的抓取。而同时也可以用robots.txt文件来对这些蜘蛛进行限制。

先来看看国内外搜索蜘蛛的user-agent吧:

一、国外爬虫的User-Agent:

1、谷歌:

Mozilla/5.0+(compatible;+Googlebot/2.1;++http://www.google.com/bot.html)

Mozilla/5.0+(Linux;+Android+6.0.1;+Nexus+5X+Build/MMB29P)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/99.0.4844.84+Mobile+Safari/537.36+(compatible;+Googlebot/2.1;++http://www.google.com/bot.html)

Googlebot-Image/1.0【谷歌图片】

2、bing

Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)

2、AhrefsBot:

Mozilla/5.0+(compatible;+AhrefsBot/7.0;++http://ahrefs.com/robot/) 

3、SemrushBot:

Mozilla/5.0+(compatible;+SemrushBot/7~bl;++http://www.semrush.com/bot.html) 

4、DotBot:

Mozilla/5.0+(compatible;+DotBot/1.2;++https://opensiteexplorer.org/dotbot;+help@moz.com)

5、Barkrowler:

Mozilla/5.0+(compatible;+Barkrowler/0.9;++https://babbar.tech/crawler)

二、国内蜘蛛爬虫的User-Agent:


1、百度:

Mozilla/5.0+(iPhone;+CPU+iPhone+OS+9_1+like+Mac+OS+X)+AppleWebKit/601.1.46+(KHTML,+like+Gecko)+Version/9.0+Mobile/13B143+Safari/601.1+(compatible;+Baiduspider-render/2.0;++http://www.baidu.com/search/spider.html)


2、搜狗搜索

Sogou+web+spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07)

3、神马搜索
Mozilla/5.0+(Windows+NT+6.1;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/69.0.3497.81+YisouSpider/5.0+Safari/537.36

4、头条搜索:

Mozilla/5.0+(Linux;+Android+5.0)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Mobile+Safari/537.36+(compatible;+Bytespider;+https://zhanzhang.toutiao.com/)

Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0);

5、360搜索

Mozilla/5.0 (Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) AppleWebKit/534.30 (KHTML, like Gecko)Version/4.0 Mobile Safari/534.30; 360Spider
Mozilla/5.0 (Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30; HaosouSpider

您可以通过程序或者服务器判断user-agent来封禁这些蜘蛛。但这种办法肯定也是需要消耗一定的服务器资源,因为在他们抓取的时候,对内容进行封锁,就会难一些。但对于向不同蜘蛛展示不同内容,就可以用程序的方法来做。

用robots.txt来怎么封禁蜘蛛呢,我们写了一个,供大家参考:

User-agent: MJ12bot
Disallow: /
User-agent: SemrushBot
Disallow: /
User-agent: SemrushBot-SA
Disallow: /
User-agent: SemrushBot-BA
Disallow: /
User-agent: SemrushBot-SI
Disallow: /
User-agent: SemrushBot-SWA
Disallow: /
User-agent: SemrushBot-CT
Disallow: /
User-agent: SemrushBot-BM
Disallow: /

User-agent: SemrushBot-SEOAB
Disallow: /
user-agent: AhrefsBot
Disallow: /
User-agent: DotBot
Disallow: /
User-agent: Uptimebot
Disallow: /
User-agent: MegaIndex.ru
Disallow: /
User-agent: ZoominfoBot
Disallow: /
User-agent: Mail.Ru
Disallow: /
User-agent: BLEXBot
Disallow: /
User-agent: ExtLinksBot
Disallow: /
User-agent: aiHitBot
Disallow: /
User-agent: Researchscan
Disallow: /
User-agent: DnyzBot
Disallow: /
User-agent: spbot
Disallow: /
User-agent: YandexBot
Disallow: /
User-agent: Barkrowler
Disallow: /

以上是封禁国外的几个流氓蜘蛛的代码,并没有封禁像谷歌,bing等搜索引擎,是因为国内有部分用户是使用这些搜索引擎的。而且谷歌影响力比较大,还是希望它能够抓取。

User-agent: Googlebot

User-agent: Baiduspider

User-agent: MSNBot

User-agent: Baiduspider-image

User-agent: YoudaoBot

User-agent: Sogou web spider

User-agent: Sogou inst spider

User-agent: Sogou spider2

User-agent: Sogou blog

User-agent: Sogou News Spider

User-agent: Sogou Orion spider

User-agent: ChinasoSpider

User-agent: Sosospider

User-agent: Yisouspider

User-agent: EasouSpider

本文作者:野狼SEO团队

十六年网站建设相关经验
一站式为您提供网站相关服务

欢迎扫码咨询

访客头像访 客3.235***
新评论

还没有人评论,快来抢个沙发!