曾经有段时间,我的网站每天都在消耗巨大的流量,然而一查日志,发现都是一些垃圾蜘蛛。
这些垃圾蜘蛛除了消耗服务器资源不对给我们带来任何好处,最好直接屏蔽。
我写了一份 robots.txt 来屏蔽常见的垃圾指数,分享给大家,建议收藏。
robots.txt
User-agent: AhrefsBot Disallow: / User-agent: MJ12bot Disallow: / User-agent: DotBot Disallow: / User-agent: SemrushBot Disallow: / User-agent: ZoominfoBot Disallow: / User-agent: BLEXBot Disallow: / User-agent: aiHitBot Disallow: / User-agent: Mail.RU_Bot Disallow: / User-agent: XoviBot Disallow: / User-agent: MauiBot Disallow: /
完整规则如下(建议直接复制使用):