8

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

James Sulak
  • 183
  • 1
  • 5

1 Answers1

10

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.

John Conde
  • 86,255
  • 27
  • 146
  • 241