设为首页 - 加入收藏 ASP站长网(Aspzz.Cn)- 科技、建站、经验、云计算、5G、大数据,站长网!
热搜: 创业者 手机 数据
当前位置: 首页 > 运营中心 > 建站资源 > 优化 > 正文

Robots.txt的正确编辑法和存放位置

发布时间:2022-06-13 10:27 所属栏目:21 来源:互联网
导读:Robots.txt的正确写法和存放位置: 1、什么是Robots,纯熟把握Robots的基本语法,写出你对本节课的领略 2、robots情势及界说: User-agent:Baiduspider(界说全部的百度蜘蛛) Disallow:/ User-agent:界说全部的蜘蛛 Baiduspider:百度蜘蛛 Googlebot:谷歌
        Robots.txt的正确写法和存放位置:
 
     1、什么是Robots,纯熟把握Robots的基本语法,写出你对本节课的领略
 
  2、robots情势及界说:
 
  User-agent:Baiduspider(界说全部的百度蜘蛛)
 
  Disallow:/
 
  User-agent:界说全部的蜘蛛
 
  Baiduspider:百度蜘蛛
 
  Googlebot:谷歌呆板人
 
  MSNBot:msn呆板
 
  Baiduspider-image:百度图片
 
  Disallow:界说那些文件可以抓取,那些文件不行以抓取
 
  Allow:应承
 
  小结:网站优化必必要有robots,robots名目区分巨细的,区分巨细写名目为:Disallow首字母必需是大写的,在当地新建记事本编辑时必要留意的是:输入法中文要切换成英文,譬喻:
 
  Disallow:/data(一个是文件夹、一个是目次)榨取以data开头的文件或文件夹/data.html/dataaaa.html/data/aaa.html根目次下的文件是不能会见的
 
  Disallow:/data/(拒绝目次的)榨取文件夹/data/aaa.html能会见/data.html/dataaaa.html
 
  2、为你在基本操纵的网站加上robots
 
  User-agent:*(界说全部的蜘蛛)
 
  Disallow:/plus/ad_js.php(拒绝目次/plus/能会见ad_js.php)
 
  Disallow:/plus/advancedsearch.php
 
  Disallow:/plus/car.php
 
  Disallow:/plus/carbuyaction.php
 
  Disallow:/plus/shops_buyaction.php
 
  Disallow:/plus/erraddsave.php
 
  Disallow:/plus/posttocar.php
 
  Disallow:/plus/disdls.php
 
  Disallow:/plus/feedback_js.php
 
  Disallow:/plus/mytag_js.php
 
  Disallow:/plus/rss.php
 
  Disallow:/plus/search.php
 
  Disallow:/plus/recommend.php
 
  Disallow:/plus/stow.php
 
  Disallow:/plus/count.php
 
  Disallow:/include
 
  Disallow:/templets

(编辑:ASP站长网)

    网友评论
    推荐文章
      热点阅读