mainEntityOfPage
mainEntityOfPage · Not mentioned by Google
Appears in
What is it?
mainEntityOfPage declares that the described entity is the primary subject of a specific web page. It points from the entity (an Article, Product, Organization) to the page URL where that entity is featured. This is the inverse of mainEntity.
Why this matters for AEO
AI answer engines use mainEntityOfPage to confirm the relationship between structured data and the page it appears on. When an AI encounters multiple entities in a page's markup, this field signals which one is the primary topic. This disambiguation helps AI systems correctly attribute the page's content to the right entity when generating answers.
What the specs say
Schema.org: URL or CreativeWork. Indicates a page (or other CreativeWork) for which this thing is the main entity being described. Inverse property: mainEntity. schema.org/mainEntityOfPage
Google: Not mentioned. mainEntityOfPage does not appear in Google's Article structured data properties table. Google Article docs
Schema.org maintainer Richard Wallis has confirmed that mainEntityOfPage should contain the URL of the page the entity is displayed on.
How to find your value
- Any page — The canonical URL of the page displaying the entity
- CMS — The page URL or slug field
- Webflow — The page URL in Page Settings or the CMS item slug
The value is always the URL of the current page. If the page has a canonical tag, use that URL.
Format and code
Type: URL or CreativeWork (WebPage object)
Simple URL format:
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Schema Markup Implementation Guide",
"mainEntityOfPage": "https://example.com/blog/schema-markup-guide"
}
WebPage object format:
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Schema Markup Implementation Guide",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://example.com/blog/schema-markup-guide"
}
}
Both formats are valid. The WebPage object format with @id is more explicit and commonly used in production implementations.
Webflow implementation
Static pages
In Page Settings > Custom Code > Before </head>:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Your Article Title",
"mainEntityOfPage": "https://yoursite.com/your-page-slug"
}
</script>
CMS template pages
Use the Webflow slug field to build the URL:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://yoursite.com/blog/{{wf {"path":"slug","type":"PlainText"} }}"
}
}
</script>
In Schema HQ
The mainEntityOfPage field is set to the canonical URL of each page automatically. It uses the WebPage object format with @id for maximum compatibility.
Real examples
nystudio107 (nystudio107.com):
{
"@type": "Article",
"mainEntityOfPage": "https://nystudio107.com/blog/implementing-custom-json-ld-structured-data"
}
Parse.ly (blog.parse.ly):
{
"@type": "NewsArticle",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://blog.parse.ly/post/57821746552"
}
}
Related fields
FAQ
What is the difference between mainEntityOfPage and mainEntity?
They are inverses. mainEntityOfPage points from the entity to the page: "This Article is the main entity of [page URL]." mainEntity points from the page to the entity: "This WebPage's main entity is [Article]." Use whichever direction fits your markup structure. Both convey the same relationship.
Should I use the URL string or WebPage object format?
Both are valid. The WebPage object format ({"@type": "WebPage", "@id": "..."}) is more common in production and more explicit. The simple URL string ("mainEntityOfPage": "https://...") is shorter and equally correct.