skip to Main Content

As you can see in below image Google WebMaster Tools robots.txt Tester tell me about 9 error but I don’t know how to fix it and what is the problem?
enter image description here

Please help me to figure out

2

Answers


  1. That is a valid robots.txt – but you’ve got a UTF-8 BOM (xefxbbxbf) at the beginning of the text file. That’s why there’s a red dot next to ‘User’ in the first line. This mark tells browsers and text editors to interpret the file as UTF-8 whereas the robots.txt is expected to use only ASCII characters.

    Convert your text file to ASCII and the errors will go away. Or copy everything after the red dot and try pasting it in again.

    I tested this on the live version, here’s the result translated from byte form:

    xefxbbxbfUser-agent: *rnDisallow: /en/news/iranology/rnDisallow:
     /en/tours-services/tour-the-soul-of-iranrnDisallow: 
    /en/tours-services/tour-a-whistle-stop-tourrnDisallow: /en/to
    

    You can clearly see the BOM at the beginning. Browsers and text editors will ignore it but it may mess with a crawlers ability to parse the robots.txt. You can test the live version using this python script:

    import urllib.request
    
    text = urllib.request.urlopen('http://www.best-iran-trip.com/robots.txt')
    
    print(repr(text.read()))
    

    If you’re able to install Notepad++, it actually has an encoding menu that lets you save it in any format.

    Login or Signup to reply.
  2. you can use webmaster panel tools
    https://www.google.com/webmasters/tools/robots-testing-tool
    and test your robots file then download it

    it works ok.

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search