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
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:
NOTE: If you cannot find the line above, try searching for this shortened version instead:
3. Replace the code
Delete the line you found and replace it with the following two lines of code:
<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
- Click the Save icon (floppy disk) in the top right.
- Test your URL again using the Google Rich Results Test.
More tips how to fix schema markup errors for Blogger:
- How to fix hCard author and missing required field name (fn) error for Blogger
- How to fix missing required field updated error For Blogger
- How to fix a value for the image field Is required error for Blogger
- How to fix the property image_url is not recognized by Google
- How to fix dateModified field error in Blogger
- How to fix missing entry-title Error in Blogger
- How to fix missing author in Blogger Template
- How to fix image field required error
