Sub topic 12
Breadcrumbs and structured data for clusters
This chapter assumes you can read HTML and JSON, you know how a topic cluster is built (one pillar page linked with cluster pages), and you can edit templates or the head of pages on your site. You do not need prior experience with schema.org.
Why markup matters for a cluster
A cluster has a hierarchy: the pillar page sits above its cluster pages. Internal links and URL paths already express that hierarchy to crawlers. Structured data adds a machine-readable statement of the same thing.
Structured data is extra markup in a page that describes the page's content in a fixed vocabulary. The most common vocabulary is schema.org, and the most common format is JSON-LD (JavaScript Object Notation for Linked Data). A JSON-LD block sits in a <script type="application/ld+json"> tag and does not change how the page looks.
A breadcrumb is a short trail of links that shows where a page sits in the site, such as Email Marketing Guide > Email Subject Lines. Visitors use it to move up a level. Search engines can read it, and Google may show it in place of the raw URL in a search result.
Structured data does not create rankings by itself. It helps a search engine interpret a page and can make a result display more clearly. It works best when the visible page, the links and the URLs already agree with it.
The visible breadcrumb comes first
Add the breadcrumb trail to the page before you add any markup. Markup should describe what visitors can see. A trail that exists only in JSON-LD can be treated as misleading.
<nav aria-label="Breadcrumb">
<ol>
<li><a href="/">Home</a></li>
<li><a href="/guides/email-marketing/">Email Marketing Guide</a></li>
<li aria-current="page">Email Subject Lines</li>
</ol>
</nav>This trail does three jobs for a cluster page:
- It gives every cluster page a link up to the pillar page, which supports the two-way linking from the earlier chapters.
- It uses short, descriptive link text for the pillar page.
- It gives visitors a way up to the broader topic without pressing Back.
The aria-label and aria-current attributes help screen reader users, so keep them.
Describing the trail with BreadcrumbList
BreadcrumbList is the schema.org type for a trail. Each step is a ListItem with three parts: a position (starting at 1), a name (the visible label) and an item (the full URL of that step).
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Email Marketing Guide",
"item": "https://example.com/guides/email-marketing/"
},
{
"@type": "ListItem",
"position": 2,
"name": "Email Subject Lines",
"item": "https://example.com/guides/email-marketing/subject-lines/"
}
]
}Place this inside a script tag in the cluster page:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Email Marketing Guide",
"item": "https://example.com/guides/email-marketing/"
},
{
"@type": "ListItem",
"position": 2,
"name": "Email Subject Lines",
"item": "https://example.com/guides/email-marketing/subject-lines/"
}
]
}
</script>Some points about this example:
- The first item is the pillar page, not the home page. Including the home page is also valid. Pick one convention and use it on every page in the cluster.
- The last item is the current page. Google's documentation allows the last item to omit
item, because the page's own URL is implied. Including it is also fine. - The
itemURL for the cluster page uses/guides/email-marketing/subject-lines/. In the pillar page example earlier in this tutorial, the same page was linked as/blog/email-subject-lines/. The breadcrumb URL, the real URL and the canonical URL must match. If they differ, the markup points to a page that is not the one you want indexed.
How markup and structure line up
The hierarchy should read the same way in four places. When one of them disagrees, search engines have to guess.
| Signal | What it says | Example |
|---|---|---|
| URL path | Where the page lives | `/guides/email-marketing/subject-lines/` |
| Visible breadcrumb | The trail visitors see | Home > Email Marketing Guide > Email Subject Lines |
| BreadcrumbList | The trail in markup | Positions 1 and 2 as above |
| Internal links | Which pages link to which | Pillar links to cluster, cluster links to pillar |
Other structured data on cluster pages
Breadcrumbs are the markup most directly tied to the cluster hierarchy, but a cluster page often carries other types as well.
Article(orBlogPosting) describes the headline, author, and publish and modified dates. The modified date is useful when you refresh a cluster, as covered in the audit chapter.FAQPagemarks up question and answer pairs that appear on the page. Google has sharply limited when it shows FAQ results, so treat this as optional and check current guidance before investing in it.OrganizationorWebSiteon the home page identifies the publisher.
Mark up only what is visible. Each page should describe itself. Do not add Article markup to the pillar page that describes a cluster page's content, and do not copy one page's markup to another.
Generating the markup from one source
Writing JSON-LD by hand for dozens of cluster pages leads to typos and stale names. A better approach is to generate it from the same data that builds the page. This script builds the markup from a list of trail steps and checks that the URLs are absolute.
import json
def breadcrumb_jsonld(trail):
items = []
for position, (name, url) in enumerate(trail, start=1):
if not url.startswith("https://"):
raise ValueError(f"Breadcrumb URL must be absolute: {url}")
items.append({
"@type": "ListItem",
"position": position,
"name": name,
"item": url,
})
return {
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": items,
}
trail = [
("Email Marketing Guide", "https://example.com/guides/email-marketing/"),
("Email Subject Lines", "https://example.com/guides/email-marketing/subject-lines/"),
]
print(json.dumps(breadcrumb_jsonld(trail), indent=2))If your CMS or SEO plugin already generates breadcrumb markup, use that and check its output instead of adding a second block. Two BreadcrumbList blocks on one page can conflict.
Common errors
- Markup that does not match the page. The JSON-LD names a trail that the page does not show. Fix by rendering the visible trail from the same data.
- Relative or mismatched URLs. Use absolute URLs, and make them match the canonical URL of each step.
- Wrong
positionvalues. Positions must start at 1 and increase by 1. Skipping or repeating a number breaks the trail. - Different trails for one page. A page reachable under two categories may get two breadcrumb paths. Choose one primary path, and keep it equal to the canonical URL.
- Invalid JSON. A trailing comma or a missing quote makes the whole block unreadable. Validate before publishing.
- Expecting a ranking boost. Breadcrumb markup changes how the result is displayed. It is not a ranking factor on its own.
Testing the markup
- Run the page through Google's Rich Results Test or the Schema Markup Validator and fix any errors.
- Compare the output with the visible trail on the page.
- After the page is indexed, open the Breadcrumbs report in Google Search Console (under Enhancements) to see valid items, warnings and errors across the whole cluster.
- Re-check after template changes, since one template edit can break every cluster page at once.
Exercise
A cluster page lives at /guides/email-marketing/subject-lines/. Its visible breadcrumb reads "Home > Email Marketing Guide > Email Subject Lines", but its BreadcrumbList has only two items: the guide (position 1) and the subject lines page (position 3). Name two problems and say how to fix each.
Show answer
First, the positions skip from 1 to 3. Positions must be consecutive, so the subject lines page should be position 2 (or, if you add Home as position 1, the guide is 2 and the subject lines page is 3). Second, the markup omits "Home", which the visible trail shows, so the two disagree. Either add Home as position 1 in the JSON-LD and renumber the rest, or remove Home from the visible trail. Generate both from one data source so they cannot drift apart.
Exercise
The pillar page links to a cluster page at /blog/email-subject-lines/, but the cluster page's breadcrumb markup uses https://example.com/guides/email-marketing/subject-lines/. Why is this a problem, and what should you do?
Show answer
The cluster page has two different URLs in use, so the links, the markup and possibly the canonical tag point to different addresses. Search engines may treat them as separate pages or pick the wrong one. Choose one URL for the page, make the pillar link, the breadcrumb item and the canonical tag all use it, and 301 redirect the other URL to it.