robots.txt协议应用及写作语法

什么是robots.txt协议?

网站管理者可以通过robots.txt来禁止搜索引擎蜘蛛对网站或网站中某个页面的抓取。

robots.txt必须放在网站根目录下才能有效。

robots.txt写作语法:

User-agent: *             —-   允许所有搜索引擎蜘蛛抓取
User-agent: Baiduspider   —-   禁止百度蜘蛛抓取
Disallow:                 —-   允许抓取
Disallow: /               —-   禁止抓取

例:
User-agent: *
Disallow: /404.html

允许所有搜索引擎抓取
禁止抓取404错误页面

常见搜索引擎蜘蛛名称:

google蜘蛛:   googlebot
百度蜘蛛:     baiduspider
yahoo蜘蛛:    slurp
alexa蜘蛛:    ia_archiver
msn蜘蛛:      msnbot
altavista蜘蛛:scooter
lycos蜘蛛:    lycos_spider_(t-rex)
alltheweb蜘蛛:fast-webcrawler/
inktomi蜘蛛:  slurp

其它SEO相关文章:

  1. No comments yet.

  1. No trackbacks yet.