html What is a canonical URL? Explanation with examples | AgentsLabs
Directly to content
Agents Labs

What is a canonical URL?

The same page at multiple addresses is more normal than you think: and without intervention, Google chooses which one counts.

A canonical URL is a reference in the code of a page that indicates which address is the official version. This is necessary because the same content is often accessible at multiple addresses, for example with and without www or with filters in the URL. Without instructions, the search engine chooses itself, and not always the version you want.

2 min reading time

IN COMMON LANGUAGE

Why the same page has multiple addresses

Almost every site has this. With and without www, with and without a closing slash, with a tracking parameter from a newsletter behind it: technically these are different addresses with the same content.

It doesn't matter to a visitor. For a search engine, yes: it has to decide which version to show, otherwise it will divide the signals over multiple addresses, all of which count a little instead of one that counts completely.

A canonical solves that with one rule: this is the real address, attribute everything to it.

WHY IT MATTERS

Where things go wrong

The most common error is a canonical pointing to the homepage on every page. Then you tell Google that your entire site is one page, and the rest disappears from the results.

With us, each page points to itself and the audit script checks that no two pages claim the same canonical: exactly the case that otherwise quietly makes pages disappear.

  • Each page points to itself — the normal case.
  • Absolute address — including https and domain name, not a relative path.
  • One canonical per page — several make the clue worthless.
  • No reference to the homepage — the most expensive mistake on this list.
  • Consistent with your sitemap — conflicting signals will cost you indexation.

FREQUENTLY ASKED QUESTIONS

More about a canonical URL

Do I need canonicals if my site is small?

Yes, and then it is easy to do well. Even a small site can usually be reached at multiple addresses. One line per page prevents your signals from spreading.

Is a canonical the same as a redirect?

No. A redirect really sends visitors and search engines to a different address. A canonical allows both addresses to work but says which one counts. If you want the old address to disappear, use a redirect.

What if Google ignores my canonical?

That's what happens: it's a strong indication, not a command. Search Console then reports that Google chose a different canonical. Usually that's a signal that your internal links or your sitemap say something different than your canonical.

CONTINUE READING

More on this topic

Of course, continue reading about this subject.

Technically okay?

We check canonicals, redirects and indexation of your site and report what goes wrong.

Schedule a free consultation info@agentslabs.net