Derfder
Derfder

Reputation: 3324

Is robots metatag mandatory or could I leave it like content=""?

I am using this tag like this on pages that I do not want to index, follow etc.:

<meta name="robots" content="noindex, nofollow, noarchive, nosnippet" />

I have also a robots.txt file in my root with something like:

User-agent: *
Disallow: /admin/
Disallow: /account/

My question is if I am using this code as my robot meta tag:

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

I mean there is nothing inside content variable. Is it html5 valid and OK from SEO point of view or not? If not what should I put inside the quotes?

Upvotes: 1

Views: 513

Answers (1)

Maksym Polshcha
Maksym Polshcha

Reputation: 18368

Let's have a look into HTML5 specification

If either name or http-equiv is specified, then the content attribute must also be specified. Otherwise, it must be omitted.

If a meta element has a name attribute, it sets document metadata. Document metadata is expressed in terms of name/value pairs, the name attribute on the meta element giving the name, and the content attribute on the same element giving the value.

The name robots is not one of the standard metadata names (See 4.5.2.1), that means there is no restriction on their value and it can be empty.

Upvotes: 1

Related Questions