What is mainEntityOfPage in structured data, and how do you use it?
guide // , 4 min read, by Darthwares
The mainEntityOfPage property in Schema.org indicates a web page or CreativeWork for which a primary item is being described. It explicitly links a page URL to the main entity detailed within that page content. Structured data is a standardized format for providing information about a web page and classifying page content. Adding explicit entity relationships helps search engines better understand page context and present clear information in search results.
On this page // 5 sections
The short version
- The mainEntityOfPage property explicitly identifies a web page as the primary container describing a specific entity.
- Structured data provides search engines with standardized metadata about page content, authors, titles, and publishing dates.
- Accepted formats such as JSON-LD and microdata help Google differentiate legitimate paywalled content from cloaking.
- Validation with the Rich Results Test and URL Inspection tool ensures markup is free from critical errors and compliant with Google guidelines.
What is mainEntityOfPage in structured data?
The mainEntityOfPage property explicitly connects an entity to the specific web page where it is described. Schema.org defines mainEntityOfPage as an indicator of a page, or other CreativeWork, for which a specific thing is the primary entity being described. Usage of this property across web markup is tracked in monthly aggregations derived from Google's web index.
In Schema.org structure, every web page is implicitly assumed to be declared as a type of WebPage. Because of this default assumption, various properties about that web page can be specified, such as breadcrumb metadata. Schema.org defines a breadcrumb as a set of links that can help a user understand and navigate a website hierarchy.
If properties are specified outside of an explicit itemscope container, search engines assume those properties describe the page itself. Schema.org documentation recommends explicit declaration whenever these properties are specified on a page. Structured data provides a standardized format for presenting information about a page and classifying page content. Explicitly setting mainEntityOfPage clarifies which entity is the primary subject of a URL.
Why should you add Article schema markup to your pages?
Adding Article structured data to news, blog, and sports article pages helps Google understand more about the web page. Google documents that Article schema can help show better title text, images, and date information for articles across search results on Google Search and other properties, such as Google News and the Google Assistant.
Google notes that there is no markup requirement to be eligible for Google News features like Top stories. However, adding Article schema allows developers and publishers to explicitly tell Google what content is about, such as clarifying that a page is a news article, defining who the author is, or specifying the title of the article. Developers should add as many recommended properties as apply to their web page.
Content and metadata on pages where images are embedded influence how and where those images appear in Google's search results. Google's selection of an image preview is completely automated and considers different sources to decide which image on a given page is shown on Google, such as in text results or Discover previews. When structured data is included, Google can display images in certain rich results, including a prominent badge in Google Images. Sites must follow general structured data guidelines as well as guidelines specific to their schema type to maintain rich result eligibility.
How does structured data clarify paywalled content for Google?
Structured data allows site owners to indicate paywalled content on a site using CreativeWork properties in Schema.org JSON-LD or microdata formats. Google explains that JSON-LD and microdata are accepted methods for specifying structured data for subscription and paywalled content.
This structured data helps Google differentiate paywalled content from the practice of cloaking, which violates Google spam policies. You must include the required properties for Google to understand that your article has paywalled content.
Adhering to structured data requirements prevents penalties and indexing issues on published pages. Google warns that if your site violates one or more structured data guidelines, Google may take manual action against it.
How do you test and troubleshoot mainEntityOfPage markup?
Testing mainEntityOfPage implementation requires verifying both code syntax and live URL rendering. Validating markup before deployment prevents structural errors from affecting how Google parses page entities.
- 01Validate your code using the Rich Results Test and fix any critical errors.
- 02Deploy a few pages that include your structured data to your production web server.
- 03Use the URL Inspection tool to test how Google sees the page.
| Symptom | Possible cause | Recommended action |
|---|---|---|
| Images fail to show badges in Google Images | Failure to follow general or type-specific structured data guidelines | Review structured data guidelines and correct markup errors. |
| Paywalled content flagged as cloaking | Missing required properties for paywalled markup | Include all required properties specified by Google for paywalled articles. |
| Manual action issued against website | Violation of one or more structured data guidelines | Fix non-compliant markup across pages and re-test implementation. |
Common questions
What is mainEntityOfPage in Schema.org?
The mainEntityOfPage property indicates a page, or another CreativeWork, for which a specific thing is the main entity being described.
Is Article structured data mandatory for Google News Top stories?
No, there is no markup requirement to be eligible for Google News features like Top stories, though adding Article schema explicitly tells Google details like title, author, and article type.
How does structured data help with paywalled content on Google?
Structured data helps Google differentiate paywalled content from cloaking, which violates spam policies. You must include the required properties for Google to understand that an article has paywalled content.
What tools can you use to validate structured data for Google Search?
You can validate code using the Rich Results Test to fix critical errors and use the URL Inspection tool to test how Google sees the page.
Primary sources and further reading
This article was researched and written by an AI model and published automatically. It was written from sentences that were checked to appear on the pages below, but a person has not reviewed the text. If something is wrong, tell us at chibivikramathithan@darthwares.com and we will correct it.