../courses.php
HEAD
HEAD103
90
Canonical URLs
Tell search engines which address is the main version of the page.
Why does a page need a canonical URL?
A canonical URL tells search engines the preferred address for the page, especially when the same content can appear at more than one URL.
Once a page has identity and mobile setup, the next question is address identity. A page can sometimes be reached through more than one URL.
For example, a page might have tracking parameters, translated versions, trailing slash differences, or copied routes.
Search engines need to know which URL is the main one. The canonical link gives that instruction.
A canonical URL belongs in the head because it describes the page before search engines evaluate the visible content.
Canonical URL in the head
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Jit HEAD - Learn The HTML Head</title>
<meta name="description" content="Learn how the HTML head controls page identity and search setup.">
<link
rel="canonical"
href="https://en.jit4all.com/learn/HEAD/">
</head>
<link>
declares a relationship between this page and another resource.
rel="canonical"
says the linked URL is the preferred version of this page.
href
contains the official page address.
Canonical URLs should usually be absolute URLs beginning with
https://.
The canonical should point to the page you actually want indexed.
Duplicate control
It prevents alternate URLs from competing with the main page.
Search clarity
Search engines do not need to guess the preferred address.
Cleaner reporting
Analytics and search tools are easier to understand when the preferred URL is consistent.
Professional setup
Production pages should have clear page identity and URL identity.
Weak canonical
<link rel="canonical" href="/">
Clear canonical
<link rel="canonical" href="https://en.jit4all.com/learn/HEAD/">
Ask ChatGPT: "Does this canonical URL match the page I want indexed?" Then open the URL yourself and confirm it is correct.
Add a canonical link to a page.
Use a full
https://
URL.
Make sure it opens the same page.
Check that the page has only one canonical tag.
Explain why that URL is the preferred version.
Pointing every page to the homepage.
Using a canonical URL that redirects.
Leaving old copied canonical URLs in new pages.
Adding more than one canonical tag.
Confusing canonical with security or redirects.
Add a canonical URL and explain how it identifies the preferred address for a page.
Login - Jit4All
Login
Welcome back to Jit4All