飘易博客(作者:Flymorn)
订阅《飘易博客》RSS,第一时间查看最新文章!
飘易首页 | 留言本 | 关于我 | 订阅Feed

网站robots.txt文件在线验证工具

Author:Flymorn Source:飘易博客
Categories:网站设计 PostTime:2008-3-5 9:44:18
正 文:
    今天检查网站的时候,发现网站的robots.txt文件始终是验证错误,说不是一个合法的robots.txt文件,很是奇怪。后来,仔细检查文件里的几行语句,怀疑是注释里使用了中文,可能国外的在线robots.txt验证工具就识别不了。去掉中文注释,在检查,报告OK了。

    国外的检查robots.txt文件合法性的在线验证工具地址是:http://tool.motoricerca.info/robots-checker.phtml。不过要注意,使用这个工具,请把robots.txt里的汉字注释清除,它识别不了汉字;如果有汉字在里面的话,它就不认为这是一个robots.txt文件了。

    如果robots文件验证通过的话,一般会显示以下结果:
Analyzing file http://www.piaoyi.org/robots.txt
No errors found in this robots.txt file
Hide empty and comments lines:  

The following block of code DISALLOWS the crawling of the following files and directories: /inc/ to all spiders/robots.  
Line 1 # robots.txt for www.piaoyi.org 
Line 2 User-agent: * 
Line 3 Disallow: /inc/ 

    另外,Google网站管理员工具也可以在线验证robots文件,google是支持中文注释的。

要分析网站的 robots.txt 文件,请按以下步骤操作:
使用 Google 帐户登录 Google 网站管理员工具。 
在"控制台"中,点击所需网站的网址。 
点击工具,然后点击分析 robots.txt。

 
    今天看到月光在说,如何通过robots去除博客的垃圾评论对自身网站的影响,原文标题《百度不支持nofollow的robots对策》。我觉的方法不错,简单来说,就是把所有博客评论里的链接转向到一个目录里处理,如function,然后在robots文件里禁止百度索引该目录下的所有链接。通过变相的方法实现了在google,yahoo里的nofollow标签的功能,进一步减少垃圾链接对自身网站的伤害。

    方法是不错,但我相信这也打击了一批真正评论的用户,他们的评论是有水准的,是非常有相关性的;而这样处理后,明显他们的积极性将受到打击,对于好的评论,我们应该尊重别人,给别人一个链接的机会。而这需要博客主人的宽容,当然,功能是可以通过程序简单实现的,如注册会员并被批准的,可以直接留下链接;那些游客留下的评论链接直接转向到被robots禁止的目录下处理。
作者:Flymorn
来源:飘易博客
版权所有。转载时必须以链接形式注明作者和原始出处及本声明。
上一篇:百度降权后的网站终于恢复排名了
下一篇:批量查询友情链接网站在百度里的收录数量--SEO工具
4条评论 “网站robots.txt文件在线验证工具”
2008-3-6 0:10:44
能力很强呀
2 宝典网
2014-4-15 1:52:06
请大家帮我看看网站
http://www.win200.com
3 Samantha
2018-4-26 14:20:43
Hi there , 
I’m sorry I don’t speak Chinese but I think this could be relevant for you… 
I was reading this page of yours: piaoyi.org/web-css/robots.txt-file-checker.html 
and it reminded me of a tool I recently found to check robots.txt file for a website 
The tool you're sharing is nice, I used to use it in the past, but sometimes it didn't work (maybe over-used?) and it was really annoying. 
I'm using this new tool for a few weeks already, and it works perfectly! Plus, I love the simple and clear design. So I thought, why not share it back with you.
Here it is: https://www.websiteplanet.com/zh-hans/webtools/robots-txt/ 
I'm sure your other users will enjoy as much as I did, if you decide to share it with them :) 
In hope I helped back, 
2018-7-24 13:15:11
您的解答对我的帮助很大
发表评论
名称(*必填)
邮件(选填)
网站(选填)

记住我,下次回复时不用重新输入个人信息
© 2007-2019 飘易博客 Www.Piaoyi.Org 原创文章版权由飘易所有