什么是robots.txt? robots.txt怎么写? robots.txt写法_温州SEO技术博客       var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-20626191-1']); _gaq.push(['_trackPageview']);(function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNodeinsertBefore(ga, s); })();        温州SEO 温州SEO技术 温州SEO建站 温州SEO基础 温州SEO工具 温州SEM营销 温州SEO杂记    当前位置:温州SEO >>温州SEO技术 > 正文           什么是robots.txt? robots.txt怎么写? robots.txt写法   作为一个合格SEO优化人员来说一定得明白什么是robots.txt?以及robots.txt怎么写? robots.txt的写法。

   robots.txt是搜索引擎中访问网站的时候要查看的第一个文件。Robots.txt文件告诉蜘蛛程序在服务器上什么文件是可以被查看的。当一个搜索蜘蛛访问一个站点时,它会首先检查该站点根目录下是否存在robots.txt,如果存在,搜索机器人就会按照该文件中的内容来确定访问的范围;如果该文件不存在,所有的搜索蜘蛛将能够访问网站上所有没有被口令保护的页面。   注意:robots.txt必须放置在一个站点的根目录下,而且文件名必须全部小写。通过你网址可以打开比如:http://www.167h.com/robots.txt 你可以打开看看robots.txt的面目。  语法:最简单的 robots.txt 文件使用两条规则:  • User-Agent: 适用下列规则的漫游器  • Disallow: 要拦截的网页    那robots.txt怎么写呢,下面列举一些常用的robots.txt写法:    1、禁止所有搜索引擎访问网站的任何部分的写法    User-agent: *    Disallow: /     2、禁止robot访问你网站特定内容写法,可以是目录也可以是特定页面   User-agent: *   Disallow: /2011/           (意为禁止访问网站2011目录下内容)   Disallow: /search.asp      (意为禁止访问网站搜索页面)       3、禁止某个搜索引擎的访问   User-agent: Baiduspider   (禁止百度访问)   Disallow: /    User-agent: Googlebot    (禁止谷歌访问)   Disallow: /    谷歌管理后台生成写法-禁止谷歌访问,但充许其他搜索访问   User-agent: *   Allow: /    User-agent: Googlebot   Disallow: /     4、允许所有的robot访问写法:    User-agent: *   Disallow:    或者   User-agent: *   Allow: /   或者也可以建一个空文件 "/robots.txt"      5、只允许某个搜索引擎的访问写法:    User-agent: Baiduspider   Disallow:     User-agent: *   Disallow: /   意思为仅允许Baiduspider访问你的网站     User-agent: *   Disallow: /    User-agent: Googlebot   Allow: /   谷歌网站管理后台生成写法,仅允许Googlebot访问你的网站    以上是robots.txt的一些常用写法。    本文链接:http://www.167h.com/seo/201101/23.html

 发布:温州网站优化 ┊ 已有: strBatchCount+="spn23=23," 人围观 | 发表时间:2011-1-6

 好文章要分享:   大家正在看:  搜索跳出率是什么荣华博客启用新域名www.167h.comZ-Blog seo优化之-优化配置Z-Blog的静态URL    【 已经有(0)位网友发表了评论,你也评一评吧!点我写评语!】    ◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

      名称(*)

  邮箱

  网站链接

 正文(*)(留言最长字数:1000)   

 

   记住我,下次回复时不用重新输入个人信息

  LoadRememberInfo();    广告宣传       置顶推荐   strBatchInculde+="mod_randomsortallrand=randomsortallrand,"   本类更新   strBatchInculde+="ulCategory=sean_category_1,";   最新评论   strBatchInculde+="mod_comments=comments,"   随便机文章   strBatchInculde+="mod_randomsortallrand=randomsortallrand,"       温州SEO优化 | 温州SEO技术 | 温州SEO博客|  |  |