In: WordPress By:MK
30 七 2010
博客或者网站一般都会有robots.txt,设置适当的robots.txt一定程度上利于SEO,毕竟你的WordPress总会有那么一些页面不希望让爬虫抓取,比如博客的登录页面wp-admin或者wp-login等等。

这里引用百度百科的说明:
搜索引擎通过robot(又称spider),自动访问互联网上的网站并获取网页信息。在网站根目录创建一个纯文本文件robots.txt,在这个文件中编写一些命令告诉robot 不要抓取和访问的这些部分,防止这些内容不被搜索引擎收录了,或者指定搜索引擎只收录指定的内容。更详细说明
使用robots.txt阻止爬虫抓取博客没必要被收录的内容是相当有必要的,毕竟这些内容仅需网站管理员知道即可,搜索引擎收录了相反不利于博客内容的真实反映。通过“Disallow”命令限制spider访问博客的部分页面,这也是SEO工作的一部分。
如果你不知道如何编写你博客的robots.txt,你可以参考一些优秀的博客,再结合自己的实际情况编写即可。
Labnol.org
Sitemap: http://www.labnol.org/sitemap.xml
User-Agent: *
Disallow: /wp/wp-admin/
Disallow: /wp/wp-includes/
Disallow: /wp/wp-content/
Disallow: /wp/wp-
Disallow: /go/
Disallow: /translate.php
Dailyblogtips.com
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /feed/
Disallow: /trackback/
Disallow: /cgi-bin/
williamlong.info(月光博客) 注:月光用的是z-blog
User-agent: *
Disallow: /ads/
Disallow: /function/
Disallow: /FCKeditor/
Disallow: /CACHE/
Disallow: /SCRIPT/
Disallow: /ADMIN/
Disallow: /google/ADMIN/
Disallow: /google/CACHE/
Disallow: /google/function/
Disallow: /blog/function/
Disallow: /info/function/
Disallow: /anni/function/
Disallow: /wap.asp
Disallow: /cmd.asp
Disallow: /google/wap.asp
Disallow: /google/cmd.asp
Disallow: /blog/wap.asp
Disallow: /blog/cmd.asp
Disallow: /info/wap.asp
Disallow: /info/cmd.asp
Disallow: /anni/wap.asp
Disallow: /anni/cmd.aspSitemap: http://www.williamlong.info/sitemap.xml
appinn.com(小众软件)
User-agent: * Disallow: /*/feed Disallow: /*/trackback Disallow: /page/ Disallow: /down/ Disallow: /wap/ Disallow: /out/ Disallow: /gc/ Sitemap: http://www.appinn.com/sitemap.xml
你会发现大部分的robots.txt中会包含Sitemap.xml,目的是为了搜索引擎更好的抓取博客内容。你可以通过安装All in One SEO Pack插件生成博客的Sitemap.xml。在10 个必备的WordPress插件和20个优秀WordPress SEO插件都有较详细的介绍。
一般情况下,robots.txt文件包含三个部分,分别是User-agent: *、Disallow:和Sitemap:。一般地,robots.txt存放在http://www.x-berry.com/robots.txt,你可以手动编写robots.txt上传至网站根目录即可。
交流群:133763678
腾讯微博:mrkwong
E-Mail:mrkwong2010@gmail.com
38 人拍砖
小羿
七月 30th, 2010 at 3:33 下午
学习了。。。。
枫雪
七月 30th, 2010 at 4:23 下午
先收藏….不知道能够给emlog用不
笑得海潮
七月 30th, 2010 at 4:24 下午
这个不错,收藏了
中国风
七月 30th, 2010 at 6:01 下午
你的网站上加上浏览,计数器,相信会有更多人关注的。就象卢松松的那样醒目 。
Mr·K
七月 30th, 2010 at 6:06 下午
To 中国风:他的站建立时间比较长,我的站还是初级发展阶段。
LOO2K
七月 30th, 2010 at 6:35 下午
williamlong.info 的不是 Z-blog 么?
集趣
七月 30th, 2010 at 7:22 下午
这些东西是根据自己需要来写 就可以了
Mr·K
七月 30th, 2010 at 7:26 下午
To LOO2K:哦,对哦,忽略这件事,不过无所谓,网站,博客都需要robots.txt
Mr·K
七月 30th, 2010 at 7:27 下午
To 集趣:的确是根据自己的需要写就可,这里只是示范罢了。
毕业生
七月 30th, 2010 at 7:40 下午
学习了
这个主题好漂亮
zzzhu
七月 30th, 2010 at 9:52 下午
我一直都没有搞这个
Danfi
七月 31st, 2010 at 12:24 上午
以前添加过也懒得改了
亮软星球
七月 31st, 2010 at 12:02 下午
好好学习一下,第一次听说这个!
7cbt
七月 31st, 2010 at 12:55 下午
我不大会写 我就不明白我那个该咋写 很头疼
灰太狼
七月 31st, 2010 at 5:44 下午
先收藏….然后慢慢学习。HOHO。感谢分享。
风羽
七月 31st, 2010 at 10:59 下午
学习了,原先都不了解这个呢。
TTkea
八月 1st, 2010 at 1:51 下午
不错,又学习了一遍,这个还是很重要的,直接关系到收录和安全问题呀,呵呵~
大树
八月 1st, 2010 at 5:02 下午
robots.txt有时候也会暴露一些后台页面,这个还是要注意的
Mr·K
八月 1st, 2010 at 11:37 下午
To 7cbt:那就照样抄一个吧!
大树
八月 2nd, 2010 at 11:56 下午
哈,好几天不更新了啊
软件盒子
八月 3rd, 2010 at 11:46 上午
我没用到这个
Mr·K
八月 3rd, 2010 at 2:29 下午
To 大树:病倒了啊。
七七
八月 3rd, 2010 at 2:47 下午
嗯,挺实在的
junofeeng
八月 3rd, 2010 at 3:35 下午
学习了。原来robot.txt还有这么多讲究 啊
Leyond
八月 3rd, 2010 at 7:21 下午
我用的都是基本最简单的
zrqx008
八月 19th, 2010 at 5:14 下午
开始写好了,换空间后一直忘上传了
怪獸蛋蛋
九月 1st, 2010 at 10:34 下午
糾正一點:月光的貌似使用Wordpress而是不是Z-blog了。
Mr·K
九月 1st, 2010 at 11:15 下午
To 怪獸蛋蛋:文中亦有特别注明。
淡定的小火柴
十月 10th, 2010 at 7:23 下午
嗯。好文章!
sardine
十月 28th, 2010 at 9:50 下午
嘿嘿,回去也加一个
上海网络营销
一月 11th, 2011 at 9:34 上午
不错。支持下!
grab your free forex ea
一月 26th, 2011 at 12:53 上午
非常好东西。.
zhangba
三月 20th, 2011 at 5:24 下午
这玩意好像效果不大,不过还是试试再说吧!
杰瑞日志
三月 25th, 2011 at 9:27 下午
很好,拜读了
莫小道
四月 30th, 2011 at 1:00 下午
来学习了。
一秒钟改变
六月 22nd, 2011 at 12:42 下午
好东西~~直接Ctrl+C和Ctrl+V
zhang
十二月 31st, 2011 at 10:13 下午
月光的想知道,问月光啊,他不会不告诉把??
zhang
十二月 31st, 2011 at 10:16 下午
Disallow: /wp/wp-content/ 都后什么啊,如果没有静态化的化,都是php生成的,是吗,不存在wp-content下边把。。