March 11, 2026

Textual description of firstImageUrl

How to fix mainEntityofPage warning in Blogger

|

If you hae analyzed your Blogger site using the Rich Results Test tool, you may have encountered a warning highlighted in orange:

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

While this is a warning, rather than a critical error.

But resolving it helps Google better understand your content structure.

As a result, it can improve meta descriptions and visibility in Search Engine Results Pages (SERPs).


WhymainEntityofPage warning appears

The mainEntityOfPage property tells search engines which specific page is the primary subject of the structured data. 

In many older Blogger templates, this property is missing from the BlogPosting schema.

That will leave search engines to "guess" the relationship between the data and the URL.

This is one of the useful posts from the DiGiztal Blogspot Blogger Tips series.

Fix mainEntityofPage warning in Blogger

How to fix mainEntityofPage warning in Blogger

1. Access your Blogger HTML

  • Sign in to your Blogger Dashboard.
  • In the left-hand menu, click Theme.
  • Click the down arrow next to the "Customize" button and select Edit HTML.

2. Locate the Post Entry Tag

Click anywhere inside the code editor and press Ctrl + F (or Cmd + F on Mac) to search for the following line:

<div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>

NOTE: If you cannot find the line above, try searching for this shortened version instead:

<div class='post hentry' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>

3. Replace the code

Delete the line you found and replace it with the following two lines of code:

<div class='post hentry uncustomized-post-template' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>
<meta itemscope='itemscope' itemprop='mainEntityOfPage' itemType='https://schema.org/WebPage' expr:itemid='data:post.link ? data:post.link : data:post.url'/>

4. Repeat for the second instance

Most Blogger templates contain two instances of this code (one for desktop and one for mobile). Search again and repeat Step 3 for the second match.

5. Save and verify

The warning should now be resolved.

More tips how to fix schema markup errors for Blogger:

👉 Check the ultimate how to add FAQ schema markup for Blogger blog post beginner guide