schema.orgmicrodata

"mainEntityOfPage" and "CreativeWork" usage on a web page of type "Organization"


I have a question regarding the correct use of the mainEntityOfPage, in this scenario:

  1. The homepage of the site is of Organization type with name, description of the company, phone, address etc.
  2. At the bottom of this page I have 3 snippets to 3 different articles published by this company.
  3. So, I am trying to declare the homepage of Organization type, being the main topic of the web page. Also, I would like to declare using Schema.org that this company has written 3 different articles which are located on their own web pages. These snippets consists of headline of article, an introducing paragraph, a picture and a "read more" button.

I use the following code:

<body itemscope itemtype="http://schema.org/Organization" >
<a href="https://testsite.com/index.html" itemprop="url">
<img src="https://testsite.com/img/logo.jpg" itemprop="logo" alt="Company logo" />
</a>
<p itemprop="name">Company name</p>
<p itemprop="description">Company description</p>

<div itemprop="mainEntityOfPage" itemscope itemtype="https://schema.org/CreativeWork">
<meta itemprop="thumbnailUrl" content="https://testsite.com/img/article-1-picture.jpg" />
<p itemprop="headline">Article 1 headline</p>
<p itemprop="description">Article 1 first paragraph.</p>
<a itemprop="url" href="https://testsite.com/url-article-1.html">Read more</a>
</div>

<div itemprop="mainEntityOfPage" itemscope itemtype="https://schema.org/CreativeWork">
<meta itemprop="thumbnailUrl" content="https://testsite.com/img/article-2-picture.jpg" />
<p itemprop="headline">Article 2 headline</p>
<p itemprop="description">Article 2 first paragraph.</p>
<a itemprop="url" href="https://testsite.com/url-article-2.html">Read more</a>
</div>

<div itemprop="mainEntityOfPage" itemscope itemtype="https://schema.org/CreativeWork">
<meta itemprop="thumbnailUrl" content="https://testsite.com/img/article-3-picture.jpg" />
<p itemprop="headline">Article 3 headline</p>
<p itemprop="description">Article 3 first paragraph.</p>
<a itemprop="url" href="https://testsite.com/url-article-3.html">Read more</a>
</div>
</body>

The code above generates the following schema:

Result of the code validation on Structured Data Testing Tool

The code is valid with Structured Data Testing Tool.

I am afraid that using mainEntityOfPage here, 3 times, to introduce the article snippets would result into the situation that the search engine would wrongly consider my page of type CreativeWork rather than Organization type, which is the real main topic on this web page.

So, this code says to the search engine that the page is of Organization with 3 articles on separate pages, or only CreativeWork type?


Solution

  • Your structured data is not conveying what you intend to convey. It’s saying that the Organization is the primary entity on the three CreativeWorks.

    So, I am trying to declare the homepage of Organization type, being the main topic of the web page.

    For this, you need a WebPage item that represents the homepage.

    <body itemscope itemtype="http://schema.org/Organization">
    
      <div itemprop="mainEntityOfPage" itemscope itemtype="http://schema.org/WebPage">
        <link itemprop="url" href="https://example.com/" /> <!-- the canonical URL of your homepage -->
      </div>
    
    </body>
    

    I would like to declare using Schema.org that this company has written 3 different articles which are located on their own web pages.

    For this, you need properties that say how the company and the articles¹ are related, like:

    Note that, for example, publisher is only defined for one direction (an article has a publisher), not for the other one (an organization has published an article).² So you have to provide this property in the Article, not in the Organization.

    <article itemscope itemtype="http://schema.org/Article">
    
      <div itemprop="mainEntityOfPage" itemscope itemtype="http://schema.org/ItemPage">
        <link itemprop="url" href="https://example.com/url-article-1.html" /> <!-- the canonical URL of the article page -->
      </div>
    
      <div itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
        <link itemprop="url" href="https://example.com/" /> <!-- the canonical URL of the organization’s homepage -->
      </div>
    
    </article>
    

    ¹ if they actually are articles, you should use the Article type instead of the parent type CreativeWork

    ² Microdata (in contrast to RDFa and JSON-LD) offers only a non-standardized way to use these properties in the other direction: see this answer