Today’s Ask an SEO question is one that you’ll find on any SEO forum, private group, or in-person meetup (remember those?).
“When should I use a canonical tag instead of a 301 redirect?”
This is a great question, not just because the answer is “it depends,” but because it’s one many SEO professionals seem to be confused about.
Before we dive in, we need to understand the differences between a 301 and a canonical tag.
301 Redirects
A 301 redirect is a way of permanently moving one URL to another.
From a user perspective, they type in one URL and magically get a different one.
No content is loaded on the original URL, it just redirects to the new place.
Most ways of doing this introduce a small delay in load times, but with CDNs and caching and modern technology, it really isn’t something we need to worry about.
There’s a ton of different ways to implement a 301 redirect.
If you’re on Apache you can do them in your .htaccess file.
It’s a bit different on Windows hosting.
You can even use a scripting language to do a redirect in code, although I would prefer to do it at the .htaccess level if possible.
The various ways to do redirects are beyond the scope of this article.
Canonical Tags
The canonical tag has been around for a long time.
It’s coming up on its 12th birthday, but SEO pros still continue to struggle with using it and non-SEO pros still struggle with pronouncing it.
The main intent behind the canonical tag is to allow the webmaster to specify the preferred URL of a page that’s similar to another page.
Think of a “print version” of a page, or a sort feature on a page.
The canonical tag can be very useful in these situations. More on that later.
A canonical tag lives in the <head> section of the website.
Canonical tags in the body of a webpage won’t be respected (if they were we could have a lot of black hat fun)
The canonical tag is simple:
<link href="https://example.com" rel="canonical">
I’ve seen some websites put the canonical attribute inside meta tags or other tags.
I’m not sure if that works, or why you’d want to do that, so just do it like above.
Canonicals vs. Redirects
I’m going to just say redirects in this section so it can cover 302 and the ever-elusive 307.
While a redirect is a directive (it literally directs you to another page) a canonical tag is only a hint to search engines.
That’s a key difference that explains when to use one vs. the other.
It’s worth considering that whenever you use a canonical tag, a search engine may choose to ignore it.
Here’s an extreme example.
Imagine a scenario where you have the URL of widgets.html with a canonical tag on it that points to widgets.htm.
These URLs are very similar except for the extension.
Now, if all the links on your site point to widgets.html and widgets.html is listed in your sitemap, the search engines may choose to ignore that canonical tag pointing to widgets.htm because all of the other signals on your website point to the .html version not the .htm version.
Despite your intention with the canonical tag, Google is choosing to use other stronger signals.
This example seems weird, but I’ve encountered tons of super complicated edge cases that basically boil down to a version of this scenario.
When to Use a Redirect
Quite simply, when you have two equal (or very similar) pages and you don’t need both pages live for some other business reason, you should use a redirect.
Examples of when to use a redirect include:
- Products you no longer carry.
- Out-of-date pages you do not wish to update (update them first).
- Pages removed from your site.
- A page that has moved to a different URL.
When you bought an expired domain to transfer its domain authority to your site.
You should not use a 301 redirect for temporary purposes, as CDNs (and some browsers) can cache this, making it troublesome to quickly undo.
Using a redirect may also slow down how often search engines crawl that old URL – which isn’t a problem if you planned on moving it to the new one but could be a problem if you plan on undoing it.
When to Use a Canonical
There are lots of great uses for canonical tags.
But in general, I like to think of canonical tags as band-aids for poor or otherwise unavoidable URL structure. They’re the last resort.
If you can’t prevent the URL from being crawled or seen, and it’s super similar to another URL, the canonical tag is your savior.
Here are some examples:
- A “print version” of a page.
- Facets and sorting of pages (e.g., a URL that shows the same products but sorted by price high to low).
- Unwanted parameters – perhaps from a paid search campaign or something else. Using a canonical can stop those pesky marketing URL strings from showing up in search results.
- Products that live in multiple categories. If you can get to a product via multiple categories on the site, you might want to canonical all of them to one version of the product page – especially if the product page is the same for every category it shows up in.
Situations where a parameter is added to the URL but the content itself is not changed:
- Instances when the user does something that alters the layout or presentation of the content, but not the actual content
What If I Have Products with Similar Content & Descriptions?
Well, it depends.
A lot of SEO professionals say to use the canonical tag for similar products but say, different colors.
But for some products the color might be important enough to garner significant search volume, and you might want a different page for it.
Some examples might be stainless steel appliances or a red Swingline stapler – things people specifically search for by color.
Most of the creative uses I see for canonical tags are in cases where they’re literally being used as a type of band-aid.
In general, if the content on the page is near identical to another page, and you don’t want both showing up in search results, use a canonical.
More Resources: