0

Schema.org explains mainEntityOfPage and gives examples here: https://schema.org/mainEntityOfPage

Then Google does in a different way and they give no explanation:
Google Markup

I have a blog post in a page, the simplified case is this:

<article itemscope itemtype="http://schema.org/BlogPosting">
  <h1 itemprop="headline name">Title of the post</h1>
  <div itemprop="datePublished" content="2016-01-07"></div>
  <div itemprop="articleBody">This is the body of the post</div>
  <div itemprop="author" itemscope itemtype="http://schema.org/Person">
    <p itemprop="name">John Doe</p>
  </div>    
</article>

In that page, there is only the blog post. How to put mainEntityOfPage applied in the example code I give? Can you explain it, please?

I suppose that I have to put, is that correct?:

<link itemprop="mainEntityOfPage" href="link-to-this-page">

But I have some questions:

  • Should this line of code be just below the itemscope itemtype?
  • Only to understand the concept, the "Entity" of the page is the classification that Schema.org gives? In my example, the Entity is BlogPosting?
unor
  • 92,415
  • 26
  • 211
  • 360
Nrc
  • 9,577
  • 17
  • 67
  • 114
  • Possible duplicate of [How to implement "mainEntityOfPage" to this specific site?](http://stackoverflow.com/questions/34466028/how-to-implement-mainentityofpage-to-this-specific-site) – unor Sep 03 '16 at 22:28

1 Answers1

2

As explained in my answer to How to implement “mainEntityOfPage” to this specific site?, this (the link element) is one way to implement it, yes. And yes, in your case this element has to be a descendant of the BlogPosting item (and not of another item in that item, like Person).

Every item (created by an element with itemscope attribute) is an entity. If you have

<article itemscope itemtype="http://schema.org/BlogPosting">
  <link itemprop="mainEntityOfPage" href="http://example.com/foo" />
</article>

it means that this BlogPosting item is the primary entity of the page identified by the URL http://example.com/foo.

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