background image

案例:运行所有的搜索引擎抓取以

htm 为后缀的路径。

User-agent: *
Allow: /*.htm$
比如:
User-agent: *
Disallow: /cgi-bin/*.htm$
这个目录

cgi-bin/abcde.html 是允许所有的搜索引擎抓取的。

允许抓取

gif 格式的动态图片,不允许抓取 jpg 格式的图片

User-agent: Baiduspider
Allow: /*.gif$
Disallow: /*.jpg$

路径格式

Disallow: /info-id-169.html

Disallow: /info-id-*.html  可以禁止上面的 169.html
Disallow: /info-id-*?*.html  不可以禁止,因为这是禁止抓取的路径是带有? .html 的路
径。

如果禁止抓取我们的域名:
Disallow: /  后面不要带任何东西,因为/就是所有的。

Disallow: /*?* 禁止抓取所有的动态参数,就是动态路径。
Disallow: /*#more-*  禁止抓取所有的 more 标签。

蜘蛛的产品名称:

产品名称
对应

user-agent

无线搜索
Baiduspider