现在搜索引擎多,蜘蛛也多,网站都被爬的不成样子了,所以想用robots.txt限制,只让目前主流的搜索引擎蜘蛛爬行网站,而robots.txt又非常重要,稍有闪失,网站都完蛋了,今天阿权站长就把用robots.txt来限制只让百度、谷歌、雅虎、搜搜、搜狗、360等主流搜索引擎蜘蛛爬自己的网站,其写法如下,仅供参考:
User-agent: Googlebot
Disallow:
User-agent: Baiduspider
Disallow:
User-agent: Googlebot-Mobile
Disallow:
User-agent: Sogou Web Spider
Disallow:
User-agent: 360Spider
Disallow:
User-agent: Yahoo!slurp
Disallow:
User-agent: MSNbot
Disallow:
User-agent: Sosospider
Disallow:
User-agent: *
Disallow: /
有关robotx.txt的说明:
robots.txt必须放置在一个站点的根目录下,而且文件名必须全部小写。Robots.txt文件的格式
User-agent: 定义搜索引擎的类型
Disallow: 定义禁止搜索引擎收录的地址
Allow: 定义允许搜索引擎收录的地址
我们常用的搜索引擎类型有:(User-agent区分大小写)
google蜘蛛:Googlebot
百度蜘蛛:Baiduspider
360蜘蛛:360Spider
sogou蜘蛛:Sogou Web Spider
yahoo蜘蛛:Yahoo!slurp
alexa蜘蛛:ia_archiver
bing蜘蛛:MSNbot
altavista蜘蛛:scooter
lycos蜘蛛:lycos_spider_(t-rex)
alltheweb蜘蛛:fast-webcrawler
inktomi蜘蛛:slurp
Soso蜘蛛:Sosospider
Google Adsense蜘蛛:Mediapartners-Google
有道蜘蛛:YoudaoBot
泽许蜘蛛: Zexuwhte
robots.txt相关参考文档:
robots协议:http://baike.baidu.com/view/9274458.htm?fromId=1280732
robots.txt写法参考:http://baike.baidu.com/view/1280732.htm?fromId=1011742
百度知道robots.txt写法:http://zhidao.baidu.com/robots.txt
百度百科robots.txt写法:http://baike.baidu.com/robots.txt
百度贴吧robots.txt写法:http://tieba.baidu.com/robots.txt
本文地址:http://www.seozz.net/zzseo/robotstxt.html
本文标题:robots.txt只让百度、谷歌、360、搜搜、搜狗收录的写法