用robots文件屏蔽垃圾搜索蜘蛛减少服务器压力

2021年05月17日 学习资料 暂无评论 阅读 592 次

蜘蛛为了采集网站数据,有时候会消耗网站很大的流量,对服务器的压力很大,有些服务器承担不了压力,直接导致网站无法打开,提示502 bad gateway,国内百度,360,搜狗蜘蛛,神马搜索指数,除了这些蜘蛛,其他国外的蜘蛛基本对国内网站用处不大,所以可以通过服务器网站robots.txt文件进行屏蔽。文件内容如下,在文件内容下添加:

User-agent: ubot
Disallow: /
User-agent: spider
Disallow: /
User-agent: AhrefsBot
Disallow: /
User-agent: DotBot
Disallow: /
User-agent: Uptimebot
Disallow: /
User-agent: MJ12bot
Disallow: /
User-agent: MegaIndex.ru
Disallow: /
User-agent: ZoominfoBot
Disallow: /
User-agent: Mail.Ru
Disallow: /
User-agent: SeznamBot
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: 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: /

给我留言