Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Simple question: Should I make sure to use Unix line endings for my robots.txt, or does it not matter?

share|improve this question
up vote 6 down vote accepted

It doesn't matter. According to the spec:

The file consists of one or more records separated by one or more blank lines (terminated by CR,CR/NL, or NL).

  • CR = Carriage Return (i.e. \r)
  • CR/NL = Carriage Return/New Line (i.e. \r\n)
  • NL = New Line (i.e. \n)

This means you can use \r. \n, or \r\n and it will work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.