문제

I am trying to validate my robots.txt file:

User-agent: *
Disallow: /Admin/
Disallow: /admin/
Disallow: /Account/
Disallow: /account/
Disallow: /robots.txt

using the frobee robots.txt checker which says that there are 2 syntax errors.

Line 1: Syntax error! Expected <field>: <value>
Line 2: Missing User-agent directive! Found Disallow

I really couldn't understand why.

Do you have any idea what is wrong in this simple robots.txt file?

도움이 되었습니까?

해결책

The robot-txt-checker at http://tool.motoricerca.info/robots-checker.phtml sees any (invisible?) char in front of the "User-agent: ..." line.

Check your encoding and make sure that there is no char in front of it. Try recreating your file with a simple editor and do not copy your existing robots.txt.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top