2

About the meta-robots, how many values can I put?

<meta name="robots" content="noindex, follow, nocache, nosnippet, noodp, noydir">

Is this valid? Or multiple meta elements?

<meta name="robots" content="noindex, follow">
<meta name="robots" content="nocache, nosnippet">
<meta name="robots" content="noodp, noydir">

Is this possible?

What is the best practice?

unor
  • 92,415
  • 26
  • 211
  • 360
RemRem
  • 75
  • 8

2 Answers2

4

As you mentioned in your question's first code block;

<meta name="robots" content="noindex, follow, nocache, nosnippet, noodp, noydir">

It is valid. You can combine them with commas use it in under 1 tag.
You can also find some good examples in this link

HddnTHA
  • 1,041
  • 3
  • 19
  • 38
2

For HTML5, the robots name is registered in WHATWG‘s MetaExtensions. There it says:

A comma-separated list of operators explaining how search engine crawlers should treat the content.

But as the entry in the wiki doesn‘t define that it’s restricted to one occurrence (like it’s the case with meta-description), it should be valid to have several meta-robots elements in a document.

If you don’t have a good reason to use several elements, use only one and comma-separate its values.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360