AmazonBot和SemrushBot不遵守robots.txt规则怎么办?

我已经在robots.txt文件内添加了这些蜘蛛禁止爬取的规则,为什么每天还有这么多亚马逊爬虫和SemrushBot来爬?不想让他们爬要怎么做?

这是我的robots.txt文件:

User-agent: GPTBot
Disallow: /
User-agent: meta-externalagent
Disallow: /
User-agent: Amazonbot
Disallow: /
User-agent: MJ12bot
Disallow: /
User-agent: YisouSpider
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: 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: /
请先 登录 后评论

1 个回答

恶意爬虫太多了,我们可以先考虑使用iptables屏蔽它们的IP,参考文章:《网站被Amazonbot和Facebook爬虫爬崩溃?按照这个方法屏蔽爬虫和他们的IP》

如果是亚马逊这些服务器很多,使用大量不同的IP来爬你的网站的,那么使用iptables我们就忙不过来了,考虑使用Fail2ban来自动封禁高频访问IP和自动解封:

《网站的服务器经常被爬虫抓到宕机怎么办,用Fail2ban自动封禁高频访问IP比ipset+iptables设置更简单!》

《用宝塔安装Fail2ban 实现服务器5分钟内高频恶意访问封禁IP及6小时后自动解封》

如果你是个犟种,非要使用iptables,而且也要自动封禁IP,那么就看这篇文章:

《Linux服务器上使用iptables自动封IP 配合ipset封恶意爬虫IP教程》

以上文章名带有链接,点击可直达。

请先 登录 后评论