Mobile app version of vmapp.org
Login or Join
Sherry384

: Google Structured Data Testing Tool is repeatedly warning me about failing to include mainEntityOfPage in JSON-LD Have I misunderstood what mainEntityOfPage represents in schema.org? I thought it

@Sherry384

Posted in: #GoogleSearchConsole #JsonLd #SchemaOrg #StructuredData

Have I misunderstood what mainEntityOfPage represents in schema.org?

I thought it told user-agents what the parent page of a given entity is, if the entity being described by structured data is the main entity of a given page.

But every time I mark up in JSON-LD an entity which is not the main entity, Google Structured Data Testing Tool warns me:


The mainEntityOfPage field is recommended. Please provide a value if
available.


So I get multiple repeated warnings recommending that each non-main entity should have a mainEntityOfPage entry.

Which... makes no sense at all.

Unless I have misunderstood what mainEntityOfPage represents in schema.org.

Am I allowed to include something like:

"mainEntityOfPage": "false"




Example:

<body>
<h1>I am a Webpage</h1>
<p>I am an introduction to the webpage.</p>

<article>
<h2>Article One</h2>
<p>As an article I am very important. In fact, I am the Main Entity of this Webpage</p>
</article>

<article>
<h2>Article Two</h2>
<p>I am another article on this Webpage, but I am not as important as Article One</p>
</article>
</body>


When I add structured data in JSON-LD about Article Two, I see the error:


The mainEntityOfPage field is recommended. Please provide a value if
available.


which (I think?) is saying - you need to tell me: Article Two is the Main Entity of... what page?

But... Article Two isn't the Main Entity of anything. It is a less important entity of the webpage for which Article One is the Main Entity.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sherry384

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

Like it’s the case with most of the warnings/errors from the SDTT, this warning is only relevant if you want to get a specific rich result.

In this case, it seems to be for Google’s Articles rich result, which recommends to use mainEntityOfPage on AMP pages. If you don’t use AMP, or if you can’t provide all of the required properties, or if you don’t care about the rich result, you can ignore the warning.

Your understanding of mainEntityOfPage seems to be correct, and your use seems to be correct, too: only provide it for articles that are the primary entity on some page.

I think your case is unusual, though. Typically each article has a dedicated page. This page might provide data about additional articles (show teasers etc.), but these additional articles all would have their own page somewhere.

If you really have a page with two articles, and neither of these articles has another dedicated page, and both articles are self-contained, and the page is primarily only about one of these articles, then your structured data should be fine.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme