网站推广之详解robots.txt


如果你希望搜索引擎收录你网站的全部网页,则你可以不设置robots.txt或上传一个命名为robots.txt的空记事本到根目录。

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

格式如:
User-agent: *
Disallow: /search.html
Disallow: /index.php?
Disallow: /tempweb/
说明:
User-agent: *   
星号说明,允许所有的搜索引擎来收录,包括百度、googleyahoo等。
Disallow: /search.html  
说明不允许收录 /search.html 这个文件。
Disallow: /index.php?  
说明不允许收录以index.php?为前缀的链接如:index.php?122.htmlindex.php?=12index.php?/baidu等等
Disallow: /tempweb/  
说明不允许收录/tempweb/里的所有文件。但可以收录如:/tempwebtaim.html 的链接。

  • 建站服务
  • 售前咨询
  • 点击这里给我发消息
  • 点击这里给我发消息
  • 点击这里给我发消息
  • 点击这里给我发消息
  • 企业定制
  • 点击这里给我发消息
  • 点击这里给我发消息
  • 售后服务