我正在使用名为 Search Engine Optimization (SEO) Toolkit 1.0
的软件测试我的网站,它显示此错误:
The content type for the response from "htpp://mysite.com/robots.txt" is "text/html". The Web server should return "text/plain" as the content type for a Robots.txt file.
我的 robots.txt 文件就是这样的:
User-agent: *
Allow: /
使用不带 BOM 编码的 UTF-8 保存。
这是错的吗?
默认的、无害的 robots.txt
文件应该是什么?
谢谢!
最佳答案
这是一个 MIME 类型问题,需要在您的服务器中进行配置。
这是一个链接:http://www.nextthing.org/archives/2007/03/12/robotstxt-adventure
对于您的特定托管服务提供商,他们会插入一小段跟踪 javascript。在评论中的客户服务支持之后禁用该功能,并且应该呈现 mimetype。
关于seo - robots.txt 错误 : Content Type should be text/plain,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20819569/