Robots.txt文件验证问题

use*_*923 1 robots.txt

我正在为我们的门户网站使用一个非常简单的robots.txt文件,如下所示

用户代理:*不允许:/允许:/robots.txt

问题是,当我使用在线验证程序并将其指向我的robots.txt文件的实时副本时,它会显示这个奇怪的额外字符和错误

Line 1 User-agent: *

This line doesn't follow a correct syntax. The correct syntax is: : , where "field" can be "User-agent" or "Disallow". Please refer to Robots Exclusion Standard page for more informations.
Run Code Online (Sandbox Code Playgroud)

请注意它在用户代理之前显示的奇怪字符.建议?

提前致谢

Chr*_*heD 5

可能导致这种情况的原因是您在文件的开头有一个BOM(字节顺序标记),因为您保存为UTF.如果是这样,最简单的解决方法是以robots.txtASCII格式重新保存文件.