Real entities are connected: a company has a founder, a website has a publisher, a book has an author. Linked schema markup expresses these relationships directly in your code. Instead of repeating the same facts in every block, each entity gets an identifier and the other blocks refer to it.
The @id property
The @id property gives an entity a unique identifier. The common practice is to use the address of the entity home followed by a fragment, such as https://www.example.com/#organization. The identifier does not need to be a real page: it only has to be unique and stay the same over time.
An example with three entities
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "Organization",
"@id": "https://www.example.com/#organization",
"name": "Example Studio",
"url": "https://www.example.com/",
"founder": { "@id": "https://www.example.com/#person" }
},
{
"@type": "Person",
"@id": "https://www.example.com/#person",
"name": "Jane Example",
"worksFor": { "@id": "https://www.example.com/#organization" }
},
{
"@type": "WebSite",
"@id": "https://www.example.com/#website",
"url": "https://www.example.com/",
"publisher": { "@id": "https://www.example.com/#organization" }
}
]
}
The Organization names its founder, the Person says where she works and the WebSite points to its publisher. Each fact is written once and referenced from the other blocks.
Good habits
- Choose identifiers once and never change them.
- Use the same identifier everywhere the entity appears on your site.
- Put the full description of an entity in one place, usually its entity home.
- Validate the result, because a typo in an identifier breaks the link silently.
Let the generator do it
Writing identifiers by hand is where most mistakes happen. The advanced tool of our free application builds these relationships for you: you create a Person and an Organization, indicate the relation, and the code is combined automatically. Read the most important schema.org types to see which entities are worth linking first.