3

Is

<meta name="robots" content="" />

a legitimate meta, exactly equivalent to:

  1. <meta name="robots" content="index, follow" />
  2. <meta name="robots" content="all" />
  3. [nothing]

Or must the content attribute contain explicit directives?

  • Whatever the answer is, I am concluding from reading multiple sources that option 3. Nothing is by far the best approach. – Rounin Dec 10 '17 at 15:41
3

option 3. Nothing is by far the best approach.

If you mean that the robots tag should be omitted entirely, then yes, that would be the best option if you want the page to be indexed and followed.

The other options just add superfluous bytes and will be ignored.

As mentioned in my answer to your other related question, Google only includes all (out of what you have posted) in its list of valid directives. But as Google states, "this has no effect" anyway, as this is the default value. Google (and I suspect all search engine bots) simply ignore index, follow - since this is again the default behavior.

<meta name="robots" content="" />

An empty content attribute is valid HTML. However, it contains no directive, so can only be ignored (as stated above).

| improve this answer | |
  • Thanks @DocRoot. The reason behind my question is that I was thinking in terms of PHP-templating. Initially, compared to providing a zero-length string variable ('') for the directives, it seemed excessive to require a condition checking whether the template should include the robots meta or not. But I am happily reconciled with that now. – Rounin Dec 11 '17 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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