MainEntity is a Schema.org property that explicitly identifies the single, primary entity—such as a Product, Article, or Event—that a webpage is definitively about. It provides a direct, machine-readable signal to search engines for entity extraction, overriding ambiguous textual analysis to establish a clear topical focus.
Glossary
MainEntity

What is MainEntity?
A structural signal used to resolve a webpage's primary focus for search engines.
By linking a WebPage to its dominant subject via mainEntity, publishers perform explicit entity disambiguation, ensuring the page's content is correctly mapped to the corresponding node in the Knowledge Graph. This property is critical for consolidating authority signals and preventing semantic drift during indexing.
Key Features of MainEntity
The mainEntity property is the definitive Schema.org signal for explicitly identifying the single, primary subject of a webpage, enabling search engines to disambiguate content and accurately populate knowledge graph panels.
Explicit Entity Declaration
The mainEntity property acts as a direct, unambiguous pointer from a webpage to its primary topic. Unlike implicit signals derived from heading tags or body text, this structured data property leaves no room for algorithmic misinterpretation.
- Mechanism: The property expects a reference to another Schema.org type (e.g.,
Person,Product,Event). - Disambiguation: It resolves identity conflicts when a page mentions multiple entities by designating the canonical subject.
- Example: On a product page, setting
mainEntityto theProductschema tells Google that the page is fundamentally about the item for sale, not the manufacturer's brand story also mentioned in the footer.
Knowledge Graph Grounding
Search engines use mainEntity as a high-confidence extraction point for populating Knowledge Graph panels. By explicitly linking the page's subject to an authoritative identifier, you facilitate direct factual association.
- Entity Reconciliation: Combine
mainEntitywith thesameAsproperty to link the subject to a canonical Wikidata URL or Wikipedia entry. - Rich Results: A correctly identified
mainEntityincreases the likelihood of triggering entity-rich features like brand carousels or knowledge panels. - Implementation: The
mainEntityis typically nested inside aWebPageschema type, creating a clear parent-child relationship between the document and its core topic.
Content-to-Entity Mapping
This property bridges the gap between a generic HTML document and a specific, defined object in a machine-readable ontology. It transforms a webpage from a collection of words into a digital proxy for a real-world entity.
- Semantic HTML vs. JSON-LD: While semantic HTML5 elements imply meaning,
mainEntityin a JSON-LD block provides a strict, logical assertion. - Topical Authority: By consistently using
mainEntityacross a site, you reinforce the relationship between specific URLs and their corresponding entities, strengthening the site's overall semantic architecture. - Use Case: A blog post reviewing a specific movie uses
mainEntityto point to theMovieschema, ensuring the review is attributed to the correct film in search databases.
Nested Entity Support
The mainEntity property does not limit a page to describing a single object; it simply designates the primary one. Secondary entities can still be fully defined within the page's structured data without confusing the search engine's extraction logic.
- Graph Construction: You can define a
WebPagewith amainEntityof typeEvent, while simultaneously defining theOrganizationthat is hosting the event as a separate node in the@graph. - Contextual Clarity: This prevents a common SEO failure where a page about a recipe is mistakenly classified as a page about the chef.
- Technical Note: The value of
mainEntitycan be either a nested object or an@idreference to another node defined within the same JSON-LD block.
Featured Snippet Optimization
By resolving ambiguity, mainEntity helps search engines confidently extract the correct definition or answer from a page to populate featured snippets and AI-generated overviews.
- Definitional Queries: For glossary pages, setting
mainEntitytoDefinedTermexplicitly marks the term being defined, making the page a prime candidate for 'What is X?' queries. - Answer Engine Retrieval: Generative engines prioritize sources where the entity is unambiguously declared, reducing the cognitive load required to parse the page's purpose.
- Structured Precision: This is a critical component of Generative Engine Optimization (GEO), where explicit entity signals are weighted heavily in retrieval-augmented generation pipelines.
Implementation Syntax
The recommended implementation uses JSON-LD within the <head> of the HTML document. The mainEntity property is a standard property of the WebPage type and its subtypes.
- JSON-LD Example:
{ "@context": "https://schema.org", "@type": "WebPage", "mainEntity": { "@type": "Book", "name": "The Great Gatsby", "author": { "@type": "Person", "name": "F. Scott Fitzgerald" } } } - Validation: Always test implementation using the Schema Markup Validator (https://validator.schema.org) to ensure the entity is correctly parsed without errors.
- Microdata Alternative: While JSON-LD is preferred,
mainEntitycan also be applied using Microdata attributes (itemscope itemtype) directly on the HTML element containing the primary content.
Frequently Asked Questions
Clear answers to the most common questions about the MainEntity schema property, its implementation, and its critical role in modern entity-based search engine optimization.
The MainEntity property is a Schema.org attribute used to explicitly indicate the single, primary entity that a webpage is about, providing a strong, unambiguous signal to search engines for entity extraction and disambiguation. When a crawler parses a page, it often encounters multiple entities—a product, an author, a brand, and a review. Without mainEntity, the search engine must probabilistically guess which entity is the page's core focus. By setting mainEntity, you declaratively state, for example, that the page is fundamentally about a specific Product or Article, even if other related entities are also described. This property is typically applied to the top-level WebPage type (or its subtypes like ItemPage, Article, ProductPage) and points to the fully defined nested entity block that represents the page's subject. This mechanism is foundational for moving from keyword-based indexing to entity-based indexing, directly influencing how your content is represented in a Knowledge Graph and surfaced in generative AI overviews.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Master the core vocabulary and implementation patterns for defining entity relationships that search engines use to disambiguate and elevate your content.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us