佛山SEO,佛山网站优化,佛山网站建设
首页 >> Google优化 >> 为机器人程序准备的robots.txt文件
为机器人程序准备的robots.txt文件
来源:     作者:    发布日期:2008-07-15     浏览次数:

为机器人程序准备的robots.txt文件
更多CSS布局、网站访问无障碍化、网站亲和力(Accessibility)文章.万维网(World Wide Web)机器人程序,会扫描全球的网页,存贮起来做成检索页,但有的时候你的某些网页不希望被机器人所索引,如何解决呢?

解决方法
这需要用到robots.txt文件了。你可把不希望被机器人所索引的目录写在里面,该文件要放在网站的跟目录。

robots.txt文件例子
User-agent: *
Disallow: /product/
Disallow: /temp/
Disallow: /test.html
这个例子说明对所有机器人开放,但不索引/product/、/temp/目录下所有文件和test.html。

User-agent: *
Disallow: /product/glass/
Disallow: /temp/
Disallow: /test.html

User-agent: /product/
Disallow:
这个例子说明对所有机器人开放,但不索引/product/glass/、/temp/目录下所有文件和test.html,但可索引/product/下除glass以外的其他目录。

User-agent: *
Disallow: /
这个例子说明网站的所有文件不被机器人所索引。

    相关文章: