常见robots.txt错误
来源:互联网 发布:activity 工作流 源码 编辑:程序博客网 时间:2024/04/24 06:16
- 颠倒了顺序:
错误写成
User-agent: *
Disallow: GoogleBot
正确的应该是:
User-agent: GoogleBot
Disallow: *
- 把多个禁止命令放在一行中:
例如,错误地写成
Disallow: /css/ /cgi-bin/ /images/
正确的应该是
Disallow: /css/
Disallow: /cgi-bin/
Disallow: /images/
- 行前有大量空格
例如写成
Disallow: /cgi-bin/
尽管在标准没有谈到这个,但是这种方式很容易出问题。
- 404重定向到另外一个页面:
当Robot访问很多没有设置robots.txt文件的站点时,会被自动404重定向到另外一个Html页面。这时Robot常常会以处理robots.txt文件的方式处理这个Html页面文件。虽然一般这样没有什么问题,但是最好能放一个空白的robots.txt文件在站点根目录下。
- 采用大写。例如
USER-AGENT: EXCITE
DISALLOW:
虽然标准是没有大小写的,但是目录和文件名应该小写:
user-agent:GoogleBot
disallow:
- 语法中只有Disallow,没有Allow!
错误的写法是:
User-agent: Baiduspider
Disallow: /john/
allow: /jane/
- 忘记了斜杠/
错误的写做:
User-agent: Baiduspider
Disallow: css
正确的应该是
User-agent: Baiduspider
Disallow: /css/
- 常见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
- scrapy爬虫出现‘Forbidden by robots.txt’错误
- HUD抬头显示
- NetAdvantage for JSF 2007 Vol.2发布
- httpurlconnection java学习资料 超时设置 jdk1.4
- Discuz!NT控件剖析 之 DataGrid(数据列表) [原创: 附源码]
- 字符星球大战!
- 常见robots.txt错误
- jbuilder2006下配置weblogic9.0
- 查看oracle数据库(database)的版本命令
- 用SQL Server保持会话状态
- 在eclipse中利用spring-osgi中的测试框架对osgi 的 boundle进行测试
- 关于茄子同志的人事考察报告
- SQL Server如何识别真实和自动创建的索引
- 一个老程序员的牢骚
- 快速掌握如何使用SQL Server来过滤数据