I know at least 2 ways to define mainEntityOfPage:

<div itemprop="about" itemscope itemtype="http://schema.org/Product">
  <link itemprop="mainEntityOfPage" href="http://example.com/article-1" />


<div itemprop="about" itemscope itemtype="http://schema.org/Product">
  <meta itemprop="mainEntityOfPage" content="Mycontent" itemscope itemType="https://schema.org/WebPage" itemid="http://example.com/article-1"/>

Both ways are succesfully validated. The questions are:

  1. Which way is more optimal/universal/recognizible for search engines?

  2. If I markup them both simultaneously is it ok? (Validator gives no errors.)


I described the different ways how mainEntityOfPage can be specified in an answer on Stack Overflow.

The difference between your two examples is that the second one creates an item (with the type WebPage), while the first one just points to another page (which might or might not define a type).

From the perspective of Schema.org, both ways are fine. The mainEntityOfPage property expects a URL (= your first example) or a CreativeWork (= your second example) as value.

In my opinion, the second example is not very elegant. The content attribute of the meta element will be ignored (because of the itemscope), but HTML5+Microdata requires it to be there. Pro: it adds (on the source page) the information that the URL represents a web page; in theory, consumers would not have to visit the URL to learn what it represents (= a WebPage). However, that is probably the default assumption in that context anyway.

It shouldn’t matter which way you choose. FWIW, Google’s Testing Tool seems to be fine with both.

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.