SEO
One graph per page
2 min readStatic Core
A page with four separate blocks of structured data is telling a consumer four unrelated things. A page with one graph is telling it how those things fit together, which is the entire point of the format.
One script, several nodes
Every page on this site passes a single graph and gets a single script tag. Inside it the nodes point at each other by identifier: the web page is part of the web site, the web site is published by the organisation, and a product or a service points its brand at that same organisation.
Anchors come from the page's own URL, resolved rather than concatenated, so nothing new has to be configured when a section moves and nothing goes stale when the origin changes.
Every id you reference must be defined here
This is the rule that is easy to break and produces output that looks correct. A reference to a node defined only on another page is valid linked data and useless to a consumer, because a consumer reads one page at a time and has no way to follow it.
That is why a blog post includes the blog node that its isPartOf field names, rather than pointing at the listing page's copy of it. The post's graph has to stand on its own.
Nothing validates this automatically. It is a check in the review steps, and it is the first thing to look at when a rich result refuses to appear for a page whose markup otherwise parses cleanly.
The other failure mode
The mirror image of a dangling reference is two nodes sharing one identifier. It happens whenever a page type that is itself the page — a FAQ page, for instance — gets emitted as a second node beside the web page node.
The right move is to type the web page node itself and hand it the questions, so there is one node with one identifier describing one page. A second node claiming the same id makes the graph ambiguous, and a consumer resolving it will pick one of them without telling you which.
Key takeaways
- Emit one @graph per page, not a pile of unrelated objects
- Every id a page references must also be defined on that page — consumers read one page at a time
- A page type that is itself the page belongs on the WebPage node, never as a second node with the same id