seo - robots.txt 错误 : Content Type should be text/plain

标签 seo content-type robots.txt plaintext robot

我正在使用名为 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/

相关文章:

asp.net - 跟踪广告链接点击但保持对 SEO 友好的链接?

php - 使用 htaccess 的 PHP 中的 SEO 友好 URL

c# - 如何为 HttpClient 请求设置 Content-Type header ?

apache - apache 反向代理上的 robots.txt

Robots.txt 不工作

seo - Vaadin 14 Flow 和 SEO、PWA

seo - 添加 Canonical 标签的有效方法

Android设置内容类型HttpPost

java - 在 jsp 文件中将 Content-Type 设置为 application/json

asp.net - 如何以及在何处将 robots.txt 文件添加到 ASP.net Web 应用程序?