HOME//FAQS

// FAQ — EXPERT ANSWER

How do you nest schema to express entity relationships?

AUG 17, 2026 11 MIN READ ANSWERED BY AISCOPEADMIN

How do you nest schema to express entity relationships?

Nesting works by putting one structured entity inside a property that belongs to another, whenever the link between the two is part of what you are describing. An Organization, for instance, can hold a PostalAddress in its address property, and a Product can name an Organization as its brand.

On bigger sites you can also declare related entities as standalone nodes, then join them through properties like mainEntity, author, publisher, worksFor or about.

Deep JSON-LD is not the aim. What matters is showing real connections between identifiable entities in a way that is clear and correct.

Markup earns far more of its value once it covers how entities connect, and not only the entities one by one.

Take a company site. It might feature an organization, a website, a handful of people, some services, a few locations and a library of articles. None of that information stands alone, because each piece is tied to the others.

A person who writes is employed by a company. That company delivers a service. A page explains the service. The company publishes an article, and a person writes it.

Structured data lets you state those ties, so machines read the site as a linked group of entities and not a pile of disconnected properties.

What "nesting" means in schema terms

Within JSON-LD, to nest is to put one object inside a property of a different object.

The inner object stands for a related entity or a structured value, and the property holding it names how the two are related.

Organization
name → what the organization is called
address → holds a PostalAddress entity
founder → may reference a Person entity
service → may describe a Service entity

Why do relationships between entities matter?

01

Context

They supply context, showing how separate entities fit together.

02

Identity

When entities are linked, it is simpler to tell apart the business, its people, its services and its pages.

03

Meaning

Saying "author" or "publisher" carries meaning that a loose list of unconnected properties cannot convey nearly as well.

A simple example of nested schema

One you will see often: an organization that carries a structured postal address.

Nested PostalAddress
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Example Company",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "123 Example Street",
    "addressLocality": "London",
    "postalCode": "SW1A 1AA",
    "addressCountry": "GB"
  }
}

In this case PostalAddress sits inside the address property of the organization.

What that relationship states

This markup does more than note that a company exists and an address exists. It states that this specific address belongs to this specific organization.

Does nested schema beat a flat structure?

Not automatically.

Nest when a property naturally holds a related entity or a structured value. The target, though, is an accurate entity model, not as much nesting as you can manage.

Nest when

  • The property naturally holds a second entity.
  • The connection is real and easy to see.
  • Describing the parent entity is helped by including the nested one.

Skip needless nesting when

  • No such relationship exists in reality.
  • Maintaining the schema turns into a chore.
  • Your only reason is that deeper JSON-LD looks more advanced.

Connecting a Person to an Organization

Pick a property that fits whichever relationship truly exists between them, and use it to state the link.

Employment is one case: worksFor can state that a person is employed by a company.

Person linked to Organization
{
  "@context": "https://schema.org",
  "@type": "Person",
  "name": "Example Author",
  "worksFor": {
    "@type": "Organization",
    "name": "Example Company"
  }
}

So the Organization nested here is not some stray organization property. It is precisely the company this person worksFor.

Connecting an Organization to its services

If you run a services business, you can define a Service entity and tie it to the organization providing it.

How Organization and Service relate
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Example Company",
  "makesOffer": {
    "@type": "Offer",
    "itemOffered": {
      "@type": "Service",
      "name": "Digital Growth Strategy"
    }
  }
}

Model the relationship that really exists

Which structure is right comes down to the relationship itself and the schema types involved. Never squeeze a business relationship into a property just because its name sounds roughly right.

Connecting an article to its author and publisher

Articles show clearly why relationships between entities matter.

You can mark an article's author and publisher as related entities, and each of those can carry more detail of its own.

Example of article relationships
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "Understanding Digital Growth",
  "author": {
    "@type": "Person",
    "name": "Example Author"
  },
  "publisher": {
    "@type": "Organization",
    "name": "Example Company"
  }
}

With this structure a machine learns that the person wrote the piece and the organization published it. That is worth more than dropping both names into unconnected properties somewhere.

When one organization shows up in several places

Here entity identifiers really prove their worth.

Instead of handling each mention of an organization as a brand new entity, your markup can assign an @id value as a stable identifier, then point to that identifier from other places.

Using @id to reuse an entity
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "@id": "https://example.com/#organization",
      "name": "Example Company"
    },
    {
      "@type": "Article",
      "headline": "Understanding Digital Growth",
      "publisher": {
        "@id": "https://example.com/#organization"
      }
    }
  ]
}

Why @id helps

Separate nodes can then point to one identified entity, so you stop producing several slightly different descriptions of what ought to be a single organization.

Nest everything, or use @graph?

Either method can express relationships. Structurally, each does a slightly different job.

Direct nesting

Best when a property naturally holds a related entity, for example the PostalAddress of an Organization or the worksFor link of a Person.

@graph

Best when a page has to describe multiple linked entities as individual nodes, joined by identifiers and relationship properties.

What a connected @graph looks like

Picture a page standing for a website, an organization and an article. You can declare each entity on its own and then link them.

{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "@id": "https://example.com/#organization",
      "name": "Example Company"
    },
    {
      "@type": "WebSite",
      "@id": "https://example.com/#website",
      "name": "Example Company",
      "publisher": {
        "@id": "https://example.com/#organization"
      }
    },
    {
      "@type": "Article",
      "@id": "https://example.com/article/#article",
      "headline": "Understanding Digital Growth",
      "publisher": {
        "@id": "https://example.com/#organization"
      }
    }
  ]
}

What matters here: the graph holds multiple identifiable nodes, and the @id values tie them back to the same underlying entities.

Properties that often help express entity relationships

author

Links a piece of content, like an article, to whoever wrote it.

publisher

Links a piece of content to the organization or other entity publishing it.

worksFor

States that a person is employed by an organization.

mainEntity

Names the primary entity a page concerns or stands for in the given context.

about

States the topic or entity that a page or creative work covers.

sameAs

Ties an entity to authoritative outside identifiers or profiles standing for that same entity.

Is sameAs just another form of nesting?

No.

sameAs signals that a different URL stands for the same entity. That is a relationship, yet it does not place the other entity inside the current one.

Treat it as linking identities

Say a company's official site wants to mark its LinkedIn company profile as the same organization. sameAs is the property that expresses it.

The biggest mistake people make when nesting schema

Inventing relationships that are not real

JSON-LD nested many levels deep may look impressive and still be wrong in meaning.

Suppose you drop a famous but unconnected person into the founder property of an organization. The result is a false relationship.

Each relationship in the markup has to match a real one between the entities it describes.

Is it possible to nest schema too deeply?

Depth for its own sake gains you nothing.

Too much nesting makes markup harder to read, maintain and debug. This is especially true when several entities really belong as separate nodes in a connected graph.

Model relationships, not hierarchy

Nobody should grade a schema implementation by counting its layers of JSON objects. Grade it on how accurately it captures the entities and relationships that matter.

What an entity graph is

It is a way to view structured data as a network of linked entities, not a set of standalone markup blocks.

Organization
publisher → Website
worksFor → Person
offers → Service
location → Place
sameAs → Outside identity or profile

This model is valuable because every relationship adds context on what each entity means and how it ties to the rest.

How a services business might structure its core entities

One option for a services business: put the organization at the center, then attach related people, services, website details and locations to it.

Organization

Stands for the business itself.

Person

Stands for an identifiable founder, author or team member, provided that relationship is real.

Service

Stands for a real service the business sells.

WebSite / WebPage

Stands for the website and the individual pages inside its information architecture.

Does every entity need an @id?

No. A small nested object does not always have to be handled as an entity you will reuse independently.

Stable identifiers do help a lot, though, with important entities that recur throughout a site.

Consider stable IDs for key recurring entities

  • The main organization.
  • The website.
  • Key people or authors.
  • Major services or products.
  • Any other entity referenced again and again on different pages.

How page-specific entities should relate to site-wide ones

It helps to separate two things: the entity the current page stands for, and the broader entities giving that page its context.

Take an article page. Its primary content entity may be an Article, with author and publisher pointing back to stable Person and Organization entities.

Treat the page as one node within a bigger information graph.

The page covers a specific subject, and its relationships tie that subject to the wider entities found across the site.

Is nested schema harder to maintain?

Yes, when someone copies the implementation by hand into many templates.

That is one reason larger sites benefit from reusable entity identifiers and a clear schema architecture.

  1. Work out which entities are site-wide.
  2. Assign stable identifiers to key recurring entities.
  3. Where it makes sense, define page-specific entities on their own.
  4. Link entities with properties that describe their relationships accurately.
  5. Never let several conflicting versions of one entity exist.

Troubleshooting a relationship that is not working

Start by checking the relationship itself

  1. Verify that the two entities really exist.
  2. Verify that the property you chose expresses the relationship you intend.
  3. Make sure the nested entity carries the right @type.
  4. Consider whether an @id is needed to link to an entity that already exists.
  5. Run the finished JSON-LD through validation and look at the rendered page source.

Practical rules for nesting schema

  1. Nest an entity when the property naturally stands for that relationship.
  2. Apply the right Schema.org type to whatever entity you nest.
  3. Reach for @id when separate nodes must point to one entity.
  4. Keep the identities of key entities consistent sitewide.
  5. Never invent relationships just so the schema looks more complete.
  6. Choose accurate semantics over the deepest possible nesting.

The best way to think about schema nesting

Think about entities and relationships, not only properties.

Your business is an entity. The people, services, locations, website and content attached to it can be related entities. How they relate is explained by properties like author, publisher, worksFor and about.

With the relationships settled, your JSON-LD structure simply reflects that underlying model, instead of being a random stack of nested objects.

Bottom line

How do you nest schema to express entity relationships?

Put the related entity inside whichever property accurately describes how it relates to its parent. An Organization can hold a PostalAddress in the address property, a Person can name an Organization via worksFor, and an Article can name a Person as author and an Organization as publisher.

On more complex sites, a better choice can be declaring key entities as standalone nodes within an @graph, joined by stable @id values. Multiple pieces of structured data can then reference one organization, person or website entity consistently.

Maximum depth should never be the aim. The aim is an accurate picture of the real entities and relationships behind the page.

Sound schema architecture reflects how the business organizes its information: entities that are clear, relationships that are clear, and identities that stay consistent.

This question falls under our AI Engine Optimization solution.
Kumar Chatpar - Marketing, SEO and Digital Marketing Expert
ABOUT THE AUTHOR

Kumar Chatpar

Marketing Expert  |  SEO & Digital Marketing Specialist

Kumar Chatpar is a marketing expert with 15 years of hands-on experience across WordPress website design, online and offline SEO, content optimization, digital marketing, email marketing and lead generation. His experience sits at the intersection of technology, marketing and customer acquisition, giving him a practical understanding of how businesses build their online presence, attract qualified prospects and turn digital visibility into business opportunities. He has worked with businesses across multiple industries, including recruitment agencies, product manufacturers and other B2B organizations.

Kumar studied marketing at the Chartered Institute of Marketing (CIM), London. For more than 12 years, he has worked with major clients in the United States, helping businesses improve their online presence through website development, SEO, content strategy, digital marketing, email marketing and lead generation. His combination of formal marketing education and extensive practical experience informs his approach to search, content and emerging digital discovery channels, including AI Engine Optimization.

15+ Years Experience WordPress Website Design SEO Online & Offline Content Optimization Digital Marketing Email Marketing Lead Generation AI Engine Optimization

// STILL HAVE A QUESTION?

Get an answer for your business

[ ASK OUR TEAM ]