robots.txt作用
来源:互联网 发布:软件开发规范 编辑:程序博客网 时间:2024/04/29 08:06
robots.txt是搜索引擎中访问网站的时候要查看的第一个文件。Robots.txt文件告诉蜘蛛程序在服务器上什么文件是可以被查看的。
以http://www.qq.com/robots.txt为例的格式作为说明:
User-agent: *
Disallow:
Sitemap: http://www.qq.com/sitemap_index.xml
User-agent:后面为搜索机器人的名称,后面如果是*,则泛指所有的搜索机器人
Disallow:后面为不允许访问的文件目录
Sitemap:后面为网站地图文件,搜索机器人根据该文件的链接地址进行爬取网站文件。
具体举例说明:
允许所有的robot访问
User-agent: *
Disallow:
或者也可以建一个空文件 "/robots.txt" file
禁止所有搜索引擎访问网站的任何部分
User-agent: *
Disallow: /
禁止所有搜索引擎访问网站的几个部分(下例中的01、02、03目录)
User-agent: *
Disallow: /01/
Disallow: /02/
Disallow: /03/
禁止某个搜索引擎的访问(下例中的BadBot)
User-agent: BadBot
Disallow: /
只允许某个搜索引擎的访问(下例中的Crawler)
User-agent: Crawler
Disallow:
User-agent: *
Disallow: /
- robots.txt作用&使用方法
- robots.txt作用
- robots.txt 的作用
- robots.txt的作用
- ROBOTS.TXT语法和作用
- robots.txt作用和写法
- robots.txt文件的作用
- robots.txt写法大全和robots.txt语法的作用
- robots.txt在SEO中作用
- robots.txt的作用与使用
- robots.txt的作用是?如何正确的写robots.txt?
- robots.txt。
- robots.txt
- robots.txt
- robots.txt
- robots.txt
- robots.txt
- robots.txt
- VisualDSP++ 5.0 无法创建LDF文件
- 谈谈学习方法和ccna的重要性
- Struts学习文档问题
- COM组件简介
- 服务不支持chkconfig解决方法脚本
- robots.txt作用
- Linux -- profile
- 数据库设计经验
- 图:使用PPT,如何进行专业的图片抽奖?[权威报道]
- Ubuntu 启动流程
- struts2-java.lang.NullPointerException at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:
- windows下配置Apache+PHP+MySQL绿色移动版
- Linux自动运行程序五法[转]
- SVN冲突的解决(zhuanzai)