Mobile app version of vmapp.org
Login or Join
Speyer207

: New required mainEntityOfPage for article structured data I had a look at the article structured data as proposed by Google and saw that there are a new required and recommended fields, they

@Speyer207

Posted in: #GoogleRichSnippetsTool #Microdata #SchemaOrg #Seo #StructuredData

I had a look at the article structured data as proposed by Google and saw that there are a new required and recommended fields, they weren't there last week. Here is the link:
developers.google.com/structured-data/rich-snippets/articles
The first property on the list is :


mainEntityOfPage.@id (recommended)


I don't understand what the value of the property must be? What is this property? Is it a link to:

schema.org/Article

..or a link to the current blog post like:

www.example.com/blog/1001/my-blog-article

They have this in their sample code:

<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="https://google.com/article" />


This what I currently have, it does not yet conform to the test tool's rules - I am still busy adding all the required properties and at the same time trying to add the recommended properties there as well:

<div itemscope itemtype="http://schema.org/BlogPosting">
<h1 itemprop="headline">
<a href="http:///www.example.com/blog/1001/my-blog-article" itemprop="url">My Blog Article</a>
</h1>
<p>Written by
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Mase Kind</span>
</span> on
<time itemprop="datePublished" datetime="2015-11-16T15:30:00+02:00">November 16, 2015</time>
<meta itemprop="dateModified" content="2015-12-10T12:29:00+02:00" />
<div itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<div itemprop="logo" itemscope itemtype="http://schema.org/ImageObject"></div>
<meta itemprop="name" content="My Company Name" />
</div>
</p>
<div itemprop="articleBody">
<p>first article body</p>
</div>
</div>


I also have this in my document:

<body itemscope itemtype="http://schema.org/WebPage">
...
</body>


Will this in any way conflict with the code sample supplied by Google?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Speyer207

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ogunnowo487

The mainEntityOfPage property is used to give the URL of a page on which the thing is the main entity. It might become clearer if you look at the inverse property mainEntity: this gives the main entity for a page (see an example).

For example, for a web page that contains a single blog post, you could provide one of these:


BlogPosting → mainEntityOfPage → WebPage
WebPage → mainEntity → BlogPosting


These properties are useful to convey what the main content on a page is (because pages might contain multiple items, e.g., an ItemList with related WebPage items, a Person describing the author, a WebSite giving some metadata, etc.).

(See my answer on Stack Overflow for a more detailed explanation.)



There are two ways how to use mainEntityOfPage:


provide the URL of the page
embed/reference the page item (typically a WebPage)


The second one often doesn’t make much sense (you would rather use the inverse property mainEntity), and probably for that reason Google recommends/expects the first one.

For providing the URL, you could simply use a link element:



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


Google’s Structured Data Testing Tool accepts this.

In the Articles Rich Snippet example, Google is using a meta element with itemid instead:


<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="https://google.com/article"/>



This is invalid HTML5+Microdata: If the meta element has an itemprop attribute, it must also have a content attribute.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme