网站运营
位置:首页>> 网站运营>> 禁止某些垃圾搜索的蜘蛛访问跟图片访问

禁止某些垃圾搜索的蜘蛛访问跟图片访问

  发布时间:2012-03-20 21:53:02 

标签:禁止,蜘蛛,抓取

最近流量飙升,而且半夜的时候服务器居然居然报错连接太多,查了下日志发现有道蜘蛛也在爬,当然Sosospider也是比较臭名昭著的,因为这些搜索用的人不多,价值也不大,所以我决定用robots.txt来禁止蜘蛛,不知道有用没有?据说Sosospider是照样无视robots.txt直接抓取的...

根目录public_html/下上传robots.txt,而public_html/bbs是我的PW论坛.

我的robots.txt写法:


User-agent: sogou spider2
Disallow: /
User-agent: YodaoBot
Disallow: /
User-agent: Sosospider
Disallow: /
User-agent: *
Disallow: /bbs/attachment/
Disallow: /bbs/attachment/.jpg$
Disallow: /bbs/attachment/.jpeg$
Disallow: /bbs/attachment/.gif$
Disallow: /bbs/attachment/.png$
Disallow: /bbs/attachment/.bmp$

意思是:禁止了搜狗,SoSO,还有有道的蜘蛛,另外PW bbs下的附件禁止所有蜘蛛访问,禁止采集图片..

不知道我这样写法有无错误?知道的来说说~

0
投稿

猜你喜欢

手机版 网站运营 asp之家 www.aspxhome.com