Forum Moderators: goodroi
<meta name="robots" content="noindex,nofollow">
<meta name="robots" content="noindex, nofollow">
Note the [space] between "noindex" and "nofollow" on the 2nd example. The robotstxt.org site itself has BOTH ways listed! So this is very confusing. It also lists case differences, should it be all lower case, all upper, or mixed case?
Thanks.
"Commas and spaces are both viewed as separators, so you can use either. Using both is just done for readability, though it's wasteful in terms of file size (you may as well have two spaces) "
So using BOTH a comma and space you're saying is also OK? I ask because that sounds like it would be two "separators".
But I hope this will clear things up. The standard can be found at
[robotstxt.org...]
It states a couple of points which are of particular interest to us. I quote from that page:
- "Note the "robots" name of the tag and the content are case insensitive."
This tells me that the following two are equivalent:
<meta name="robots" content="noindex,follow">
<meta name="ROBOTS" content="NOINDEX,FOLLOW">
as are any other possible combination.
- "The content of the Robots META tag contains directives separated by commas"
Also the formal syntax says:
- "directives = directive ["," directives]"
So I disagree with Ebear that "Commas and spaces are both viewed as seperators, so you can use either."
The syntax states that a directive (the content part of the tag) is a comma separated list. So a space on its own is not a separator. E.g. content="noindex follow" is invalid syntax.
The "," suggests to me that a space should NOT be placed after the comma separator.
But I doubt whether any robot takes this literally and I feel that if you put a space after the comma the directive would still be observed.
Anyone have any further comments please post!