Canonicals, hreflang, sitemaps and structured data
Canonicals, hreflang and structured data are signals Google checks, not orders it follows.
Predict first
Before you read: predict
This item runs on this lesson's Google model, whose rules quote Google's pages. ExamHall's AWS exam page has three URLs: (1) /en/exams/aws-saa, (2) /ar/exams/aws-saa and (3) /exams/aws-saa, where visitors pick a language. Each page's <head> holds hreflang links with full URLs. Page 1 names en → page 1, ar → page 2 and x-default → page 3. Page 2 names ar → page 2 and en → page 1. Page 3 names only x-default → page 3.
Which pages does Google treat as versions of one another?
The 30-second version
Google groups duplicate URLs by content and shows one, the canonical. Redirects and rel="canonical" are strong hints, sitemaps weak; Google still chooses. Google uses an hreflang link only when both pages name each other; a missing return link drops just that pair. JSON-LD earns a rich result only for a listed feature.
Canonicals, hreflang and structured data are signals Google checks, not orders it follows.
How it works
Step 1 of 13
http and https, a sort order. Google shows one URL per group, the canonical.In the kitchen
- a film shown on three channels this week gets one full entry; the other showings point to it → one canonical per group of duplicates (step 1)
Analogy: The editor of a weekly TV listings magazine
| In the listings magazine | In Search |
|---|---|
| a film shown on three channels this week gets one full entry; the other showings point to it | one canonical per group of duplicates (step 1) |
| a channel's press note naming its showing as the main one is weighed against the others | rel="canonical" as a strong hint (step 2) |
| the Welsh and English broadcasts of a series are cross-referenced only where each channel's listing names the other | hreflang counting both ways (step 8) |
| readers whose language has no broadcast are pointed to the "all languages" index page | x-default (step 10) |
| a press note's typed fields (cast, running time) print as a boxed panel only for programme types the magazine has a panel for | rich results only for listed features (step 13) |
In real terms: each tag is a claim Google checks against the pages themselves: the content, the other versions' tags, its own list of features.
Breaks down when: an editor can phone a channel to ask what it meant; Google never asks, so a tag it cannot read, or a link that is not returned, simply counts for nothing.
Contrasting case: a 301 redirect is not a claim to weigh: the old URL stops serving the page, so the target is the only copy left to show.
Examples, run for real
4.1 ExamHall EXH-4630 → MR !4930: campaign links split one exam page
Campaign emails linked /en/exams/aws-saa?utm_source=…, and ExamHall's pages declared no canonical (EXH-4630). MR !4930 adds <link rel="canonical"> to every page's server HTML, built from the path with the query dropped.
4.1 EXH-4630, no canonical · /en/exams/aws-saa and its 2 utm_ URLs: 1 group of 3 · shown: Google's own choice
4.1 MR !4930, canonical from the path · the same 3 URLs: 1 group · shown: https://examhall.example/en/exams/aws-saa
4.1 MR !4930 · /ar/exams/aws-saa and its utm_ URL: their own group of 2 (translated content) · shown: https://examhall.example/ar/exams/aws-saa
The three English URLs form one group, and the canonical names the plain path; the Arabic URLs form their own group, since their content is translated (steps 1–3, 6).
4.2 Proof domain, chat: a sitemap as the only signal
A chat app's public channel archive answers at /c/general and at /c/general?highlight=42, which shows the same messages. Neither page declares a canonical.
4.2 /c/general and /c/general?highlight=42, no canonical, no sitemap · 1 group of 2 · shown: Google's own choice
4.2 sitemap.xml lists /c/general · strong signals 0, weak 1 · shown: https://chat.example/c/general
With no strong signal, the sitemap's weak one decides between the two duplicates (steps 2, 11).
Try it
Answer first, then check. Nothing is saved.
Question 1 of 6
This item runs on this lesson's Google model, whose rules quote Google's pages. ExamHall's catalog template was rewritten four ways. Each version serves /exams/aws-saa?utm_source=forum and is meant to tell Google that https://examhall.example/exams/aws-saa is the canonical URL.
Which version's canonical does Google not use?
Question 2 of 6
This item runs on this lesson's Google model, whose rules quote Google's pages. A chat app publishes its public channels as read-only archive pages. Google crawls four URLs, all answering 200: (1) /c/general, (2) /c/general?utm_source=newsletter, (3) /c/general?ref=invite and (4) /c/random. URLs 1 to 3 show the same messages; URL 4 shows other messages. A template bug gives every page, URL 4 included, <link rel="canonical" href="https://chat.example/c/general"> in its <head>.
Which URLs can appear in Google's results?
Question 3 of 6
This item runs on this lesson's Google model, whose rules quote Google's pages. ExamHall's exam page has an English version, an Arabic version and a language picker. All three pages name one another in their <head> with full URLs: en → /en/exams/aws-saa, x-default → /exams/aws-saa, and one value, the same on every page, for /ar/exams/aws-saa. The Arabic page is for Arabic speakers in every country. Searchers whose browsers are set to ar-EG, ar-SA and ar-MA should all be sent to it.
Which value fills hreflang="____" in the links naming the Arabic page?
Question 4 of 6
This item runs on this lesson's Google model, whose rules quote Google's pages. A chat app's site adds JSON-LD to four pages, each block with every property its feature's guide requires: (1) the help centre's questions page, "@type": "FAQPage", in the HTML the server sends; (2) a guide to setting up notifications, "@type": "HowTo", in the HTML the server sends; (3) the next "ask me anything" livestream, "@type": "Event", added by a script after the page loads; (4) the livestream after that, "@type": "Event", in the HTML the server sends, with a comma after its last property. As of 2026-10-16, Google's list of structured data features holds Event and no FAQ or How-to feature.
How many of the four pages are eligible for a rich result?
Question 5 of 6
This item runs on this lesson's Google model, whose rules quote Google's pages. ExamHall moves its hreflang links out of the page heads and into a sitemap; /en/exams/aws-saa and /ar/exams/aws-saa now carry none in their HTML. Each <url> entry below holds the page's full URL in <loc> and xhtml:link entries with hreflang="en" and hreflang="ar". A searcher whose browser is set to ar-SA should be sent to the Arabic page.
Which layout does that?
Question 6 of 6
This item runs on this lesson's Google model, whose rules quote Google's pages. A chat app's help article has five versions whose <head> tags all name one another, with full URLs and these values: en, en-GB, de, es-419 and x-default (a language picker). Four searchers' browsers are set to en-AU, es-419, de-AT and fr-FR.
How many of the four does hreflang send to the picker?
Go deeper
Pro tip
- When asked how to stop tracking and filter parameters from splitting a page in search, answer in signal order: redirect the URLs that should not exist, put a self-referencing canonical built from the path in the server's HTML, list only canonical URLs in the sitemap, then say Google still makes the final choice. When: the interviewer asks how to avoid duplicate-content problems on parameter URLs. Status: SELF; not run.
Source
Valid as of 2026-10-16. Every rule the model adds is quoted from these pages in lib/google.mjs.
- Google Search Central, How to specify a canonical URL with rel=canonical and other methods (named in the row; the page title's quotation marks dropped here): https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls ·
google-consolidate-duplicates.txt. "Redirects: A strong signal that the target of the redirect should become canonical."; "Sitemap inclusion: A weak signal that helps the URLs that are included in a sitemap become canonical."; "Google will decide which pages (if any) are duplicates, based on similarity of content."; "link element is only accepted if it appears in the <head> section of the HTML"; "Even though relative paths are supported by Google"; "Don't use the robots.txt file for canonicalization purposes."; "make sure to specify a canonical page in the same language". Supports steps 1–6. - Google Search Central, Tell Google about localized versions of your page (named in the row): https://developers.google.com/search/docs/specialty/international/localized-versions ·
google-localized-versions.txt. "Each language version must list itself as well as all other language versions."; "If two pages don't both point to each other, the tags will be ignored."; "Google will still process the ones that point to each other."; "other codes that aren't listed in those standards, such as es-419, aren't supported."; "The reserved x-default value is used when no other language/region matches the user's browser setting." Supports steps 6–11. - Google Search Central, Introduction to structured data markup in Google Search (named in the row): https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data ·
google-structured-data-intro.txt. "all 3 formats are equally fine for Google, as long as the markup is valid"; "Google can read JSON-LD data when it is dynamically injected into the page's contents, such as by JavaScript code"; "You must include all the required properties for an object to be eligible for appearance in Google Search with enhanced display." Supports steps 12, 13. - Google Search Central, Structured data markup that Google Search supports: https://developers.google.com/search/docs/appearance/structured-data/search-gallery ·
google-search-gallery.txt. "To make your site eligible for appearance as one of these rich results, follow the guide to learn how to implement structured data on your site."; "The actual appearance in search results might be different." Its feature list, as read, includes Article and Event and no FAQ or How-to feature. Supports step 13.
Related lessons
Checked against the tools and docs as of 2026-10-16.