robots.txt是什么?
来源:互联网 发布:触手弹幕机器人 软件 编辑:程序博客网 时间:2024/04/29 11:04
robots.txt
有没有想过,如果我们某个站点不让百度和google收录,那怎么办?
搜索引擎已经和我们达成一个约定,如果我们按约定那样做了,它们就不要收录。
这个写约定的的文件命名为:robots.txt。
robots.txt是一个最简单的.txt文件,用以告诉搜索引擎哪些网页可以收录,哪些不允许收录。
关于robots.txt一般站长需要注意以下几点:
- 如果你的站点对所有搜索引擎公开,则不用做这个文件或者robots.txt为空就行。
- 必须命名为:robots.txt,都是小写,robot后面加"s"。
- robots.txt必须放置在一个站点的根目录下。如:通过http://www.seowhy.com/robots.txt 可以成功访问到,则说明本站的放置正确。
- 一般情况下,robots.txt里只写着两个函数:User-agent和 Disallow。
- 观察这个页面并修改为自己的:http://www.seowhy.com/robots.txt
- 有几个禁止,就得有几个Disallow函数,并分行描述。
- 至少要有一个Disallow函数,如果都允许收录,则写: Disallow: ,如果都不允许收录,则写:Disallow: / (注:只是差一个斜杆)。
补充说明:
User-agent: * 星号说明允许所有搜索引擎收录
Disallow: /search.html 说明 http://www.seowhy.com/search.html 这个页面禁止搜索引擎抓取。
Disallow: /index.php? 说明类似这样的页面http://www.seowhy.com/index.php?search=%E5%A5%BD&action=search&searchcategory=%25 禁止搜索引擎抓取。
- robots.txt是什么?
- robots.txt。
- robots.txt
- robots.txt
- robots.txt
- robots.txt
- robots.txt
- robots.txt
- robots.txt
- robots.txt
- robots.txt
- robots.txt
- robots.txt
- robots.txt
- robots.txt
- robots.txt
- Robots.txt指南
- Robots.txt指南
- OgreTerrain 实现原理分析
- Tree
- hdu 3953 I'll play a trick on you
- UIView动画
- Generate a Binary Sort Tree using an array
- robots.txt是什么?
- Linked List/Singly-Linked List/Doubly-Linked List
- Ogre摄像机Camera类
- 程序员的成长环境
- Advantage and disadvantage of XML
- /proc目录详解
- XML Schema and DTD
- Ogre场景管理器SceneManager类
- XML namespace