html · level 3 · unit 4 · lesson 3
- meet it
- guess first
- your turn
- fix it
- nailed it
Tap a green word if you get lost.
meet it
rel="canonical" names the one true address of a page.
One page can often be reached through many addresses: with or without www, or with ?ref=email added by a newsletter. To a search engine, each one looks like a , and the page's place in the results gets split between them.
Choose one , the real home of the page, and name it in the head with <link rel="canonical" href="...">. Search engines then gather everything under that one address.
Always write the full URL, starting with https://. Every copy of the page carries the same canonical link, and the real page points to itself.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Lemon drizzle cake recipe | Bake Street</title>
<link rel="canonical" href="https://example.com/recipes/lemon-drizzle">
</head>
<body>
<h1>Lemon drizzle cake</h1>
</body>
</html> Press show my page to see it here.
Whether someone arrives from a newsletter or a search, this page always names the same home.
guess first
Someone opened this page from a newsletter link ending in ?ref=email. Which address will search results show?
Guess before you run it. Wrong guesses are how you learn, and nothing is marked.
<head>
<title>Red wellies | Puddle Shoes</title>
<link rel="canonical" href="https://example.com/shop/red-wellies">
</head>
<body>
<h1>Red wellies</h1>
</body>
your turn
Your turn. Name the real address.
This page's real home is https://example.com/walks/bristol. Fill rel and href on line 6 to make the canonical link.
Press show my page to see it here.
- the canonical link names the real addressnot checked yet
- there is only one canonical linknot checked yet
fix it
The canonical link is only half an address. Can you fix it?
Press show my page to see it here.
- the canonical link is a full URLnot checked yet
- Search engines want the whole address. What is missing from the start of this one?
- A canonical link should be a full URL:
https://, then the domain, then the path. - Change the
hrefon line 6 tohttps://example.com/recipes/scones, then press run.
nailed it
one page, one address. :D
- Duplicate addresses split a page's place in results.
<link rel="canonical">names the real address.- Always use the full URL, starting with
https://.
new words in your collection
- duplicate
- canonical URL
This lesson isn’t saved. A free account remembers every lesson you finish.