What is a canonical tag in SEO?
A canonical tag (rel="canonical") is a snippet of HTML code that tells search engines which version of a URL is the "master" or "authoritative" one. It is used to prevent duplicate content issues by consolidating ranking signals into a single, preferred URL.
The $10,000 Mistake: Why I Use Canonicals on Every Page
Years ago, I worked on a site that had 5,000 "duplicate" pages because of tracking parameters (like ?source=fb). Google got confused and ranked the wrong pages, or stopped ranking them entirely. We fixed it in one afternoon using canonical tags. My rule of thumb now? Every single page should have a self-referencing canonical tag. It’s the cheapest SEO insurance policy you can buy.
When to Use a Canonical vs. a 301 Redirect
- Use a 301 Redirect: When you want to permanently move a page and don't want the old URL to exist anymore.
- Use a Canonical Tag: When you want both URLs to exist (like a product page in two different categories) but want Google to only rank one.
Frequently Asked Questions
Where does the canonical tag go?
It must be placed in the <head> section of your HTML, not the <body>.
Can I canonical to a different domain?
Yes, this is called a cross-domain canonical. It's useful if you're syndicating content from one site to another.