首页 > 问答 > 被一些垃圾蜘蛛盯上了,消耗很多流量,robots.txt高手帮我看看这

被一些垃圾蜘蛛盯上了,消耗很多流量,robots.txt高手帮我看看这

[导读]:User-agent: Baiduspider Disallow: User-agent: Sosospider Disallow: User-agent: sogou spider Disallow: User-agent: YodaoBot Disallow: User-agent: Googlebot Disallow: User-agent: Bingbot Disallow: User-agent: Slurp Disallow: User-ag...

User-agent: Baiduspider
Disallow:
User-agent: Sosospider
Disallow:
User-agent: sogou spider
Disallow:
User-agent: YodaoBot
Disallow:
User-agent: Googlebot
Disallow:
User-agent: Bingbot
Disallow:
User-agent: Slurp
Disallow:
User-agent: Teoma
Disallow:
User-agent: ia_archiver
Disallow:
User-agent: MSNBot
Disallow:
User-agent: Robozilla
Disallow:
User-agent: googlebot-image
Disallow:
User-agent: googlebot-mobile
Disallow:
User-agent: psbot
Disallow:
User-agent: *
Disallow: /

你说的垃圾蜘蛛看是哪些,你统计一下,把最主要的那些垃圾蜘蛛写上规则屏蔽掉就可以了,其它的你不用写,你可以看下相关介绍

###

蜘蛛多多益善。

###

Robots对垃圾蜘蛛根本没有用,因为垃圾蜘蛛根本不会遵守robots的协议

###

你这样写太麻烦了

###

Robots规则对于垃圾蜘蛛基本没有约束的,robots是写给主流的几大搜索引擎的。垃圾蜘蛛其实基本都是爬虫过来的,直接做好反爬措施。比如如果IP是规律的直接屏蔽IP,动态的那么就加人机验证。

###

你这样写是有问题的啊!正确的写法应该是
User-agent:YisouSpider
Disallow:/
你要拒绝什么蜘蛛,就把蜘蛛名称写上就行了!
关键问题有些蜘蛛他根本就不遵守Robots规则!所以,你拒绝也没用,要是服务器的话,可以尝试把它IP加入到防火墙!

###

这不能说有问题,但不是好的写法。

一般,我们倾向于写限制的内容。
如,你在日志中,看到想限制的,就把他限制即可。

比如你想限制某个×××Spider,一般这样写:

User-agent: *
Disallow: / (这里就是你原本要屏蔽的一些内容)

User-agent: ×××Spider
Disallow: /

本文来自投稿,不代表微盟圈立场,如若转载,请注明出处:https://www.vm7.com/a/ask/88669.html