Have you ever noticed that some websites have different versions of their domain names? If you’ve entered “www” before a domain and it automatically changes to a non-www address, you’re seeing canonicalization at work.
But what is canonicalization and why does it matter? And how do you set it up? Read on for our quick easy guide to understanding and setting up the canonical URL for your website.
What does “canonical” mean?
A canonical URL is the “official” or most authoritative address of your site. This comes into play on different versions of a website (i.e., the www version being more authoritative than the non-www version). Basically, the idea is that the canonical URL is the one you want Google and other search engines to recognize as the primary, official version to display in search results
Why does choosing a canonical URL matter?
The main reason to choose a canonical URL is to combine all of the link authority that resides at each different version of your domain.
To explain further, the following URLs would appear virtually the same to most people:
At a glance these seem to be the same, but in reality, they’re different: While they show the same content, search engines identify them as four separate websites.
How the typical user links to your site
Let’s say Brian Blogger decides he likes your site and wants to tell people about it, so he puts up a blog post and links directly to you. But how does that link appear?
Each person is different, and using the examples above, there are four different ways someone could link to you. The most common way people link to you is by adding or subtracting the “www” before a website.
So let’s say that Brian Blogger links to you via www.yourdomain.com, but Sally Siteowner links to you through yourdomain.com.
The value that comes from those links is isolated to the version of domain address being linked to unless you’ve identified one of those addresses as your canonical. For SEOs and web developers it’s critical that we determine which of these is our #1 URL and ensure the others (along with their links) all redirect to that one.
How to identify the URL that should be canonical
SEO is data-oriented, so the easiest way to determine which URL should be your canonical is to look at the data you have available.
There are a lot of tools available online, but for the quickest overview, we like to use Moz Open Site Explorer. If you enter the different versions of your URL, Moz will return all kinds of metrics dealing with your site.
The one metric we pay the most attention to is Domain Authority (DA) — when you have a URL that has a higher DA than the others, normally that should be your canonical URL.
Here are our Open Site Explorer results for devdag.wpengine.com versus www.devdag.wpengine.com:
You can see at a glance that the non-www version of our site has the most authority — all of its metrics are higher than the www version. As a result, we make sure that the www version (and the 17 links going to it) are redirected to devdag.wpengine.com.
How to set the canonical URL for your website.
Fortunately, since this is an important issue for websites, methods for setting up the canonical version of a website have been developed. The most common way is through a server redirect:
a 301 redirect gives the server a status code that the URL is being permanently redirected. In our example, we are 301 redirecting www.devdag.wpengine.com to go to devdag.wpengine.com at the server level.
a 302 redirect tells your server the redirect is only temporary.
For the purposes of determining a canonical URL, the 302 redirect should never be used. Google specifically does not pass authority to your website from a 302 temporary redirect.
A second way you can identify your canonical URL is through your Google Webmaster Tools Search Console.
When you set up your Webmaster Tools, you will be allowed to “Set Your Preferred Domain” — this tells Google’s tools which version of your URL you would prefer to have as your primary domain. If you set your preferred domain as http://yourdomain.com, Google will treat links to http://www.yourdomain.com exactly the same as links to http://yourdomain.com.
To specify your preferred domain in Webmaster Tools:
- In your Search Console homepage, make sure you identify the different versions of your website.
- Click the version of your site you want.
- Click the gear icon, then click Site Settings.
- In the Preferred domain section, choose the site you want to be preferred.
Ideally, you would use both a 301 redirect and setting your preferred domain to ensure you are redirecting traffic and links from the non-preferred version so that all search engines and users will know the main version of your site.
This is just one of many items site owners and web developers need to be aware of when designing and launching a site. For more tips on building SEO success into your site, download our SEO Checklist for Launching Your New or Redesigned Website.
Latest posts by Brian Valentin (see all)
- Google Business Profiles for Lawyers - December 29, 2022
- Understanding Where Your Traffic is Coming From with UTM Tracking Codes - January 5, 2022
- How to Conduct Your Own Quick Local SEO Audit - August 10, 2020