yestao123导购网 发表于 2011-11-30 15:51:25

SEO中robots的写法

robots.txt文件的内容主要就是一个代码:Disallow:


注意,robots.txt文件中一般要包含至少一个Disallow:

如果都允许收录,你可以写一行Disallow:/search.html   这个文件(search.html)本来就不存在也没事。


格式如:

User-agent: *

Disallow: /search.html

Disallow: /index.php?

Disallow: /tempweb/



说明:

User-agent: *   星号说明,允许所有的搜索引擎来收录,包括百度、google、yahoo等。

Disallow: /search.html说明不允许收录 /search.html 这个文件。

Disallow: /index.php?说明不允许收录以index.php?为前缀的链接如:index.php?122.html、index.php?=12、index.php?/baidu等等

Disallow: /tempweb/说明不允许收录/tempweb/里的所有文件。但可以收录如:/tempwebtaim.html 的链接。

这里介绍的是常用的几个代码。
页: [1]
查看完整版本: SEO中robots的写法