Skip to content

Selecting a Website’s Canonical Domain

By Matthew Edgar · Last Updated: April 21, 2023

Selecting a canonical domain (or preferred domain) for a website is a foundational part of your website’s SEO. What exactly is a canonical domain, and why does it matter to your SEO website’s performance? In this article, let’s review what a canonical domain is, explore the impact a canonical domain has on SEO and user experience, and review the decision-making process for selecting the most effective domain structure for your website.

What is a Canonical Domain?

A canonical URL is the official or preferred version of a URL, and defining a canonical tag helps to resolve duplication. For instance, let’s say a page of your website can be reached at either mysite.com/somepage or mysite.com/somepage.php and both of these URLs return exactly the same content. Allowing the same content to return at multiple URLs creates duplicate content, which can be confusing to users and also confusing to search engine robots.

The term “canonical” typically is used to refer to a canonical version of a particular URL. However, we can apply this same idea to the website’s entire domain.

A canonical domain is the preferred or official version of your website’s domain-wide URL structure.

Domain Duplication: Example & Problems

URLs on a domain can be accessed in a variety of ways:

  • with or without a security certificate (at the non-secure protocol of HTTP or with the SSL certificate at the secure protocol or HTTPS)
  • with or without www
  • with or without a slash at the end of the URL

With that in mind, there are eight ways to access URLs on my domain:

  1. http://matthewedgar.net
  2. https://www.matthewedgar.net
  3. http://matthewedgar.net/
  4. https://www.matthewedgar.net/
  5. https://matthewedgar.net
  6. https://www.matthewedgar.net
  7. https://matthewedgar.net/
  8. https://www.matthewedgar.net/

If each of these variations returned content, that would mean my website’s pages would be available at eight different URLs. Remember, though, that domain URL structure choices apply to every URL on the website so unless a canonical domain is selected and enforced properly, every URL on the website could be accessed in eight different ways.

If no canonical domain structure is selected, search robots will find it harder to crawl through a website and determine which version of the page to index and rank in search results. That can significantly impact SEO performance.

Along with the negative SEO impacts, the lack of HTTPS in the URL can cause concern for users since HTTPS indicates a level of security. That can hurt conversion and engagement rates on the website.

Occasionally, one domain version can return different content than another domain version. For example, https://mysite.com/some-page may contain text and images while https://mysite.com/some-page/ returns an empty page. This typically happens due to the code relying on a particular domain version and not working properly with other domain versions.

Select a Canonical Domain

To avoid problems, you need to select a canonical version of your website’s domain. That requires answering the following key questions:

  1. Should my domain include a www or not?
  2. Should my domain be secured via an SSL certificate (HTTPS) or not (HTTP)?
  3. Should pages on my domain end in a trailing slash?

Should my domain include www?

It is a matter of preference whether your canonical domain includes www. Some tests we’ve run at Elementive show that some user groups respond better when using “www” in the URL. Of course, another user group might prefer the opposite and find the lack of “www” in the URL appealing. In other cases, using the “www” or not says something about the brand itself. In deciding whether to include the “www”, think about what it says about your organization and how your users will respond.

From an SEO perspective, websites can rank with or without www in the canonical domain. What matters is that you only allow your website’s content to display at one version of the domain.

Should my domain be secured via an SSL certificate (HTTPS)?

The short answer is that, yes, your website should use an SSL certificate. About 95% of websites use an SSL certificate as of April 2023, so it would look suspicious if your website does not use an SSL certificate. Major browsers will also show warnings to visitors if a website does not use an SSL certificate.

There is also an SEO value in using HTTPS. Google made HTTPS a ranking signal in 2014. As of 2023, Google still considers HTTPS to be part of the page experience factors but Google has clarified that HTTPS may not directly affect rankings. Nevertheless, using HTTPS is still an important part of communicating your website’s trustworthiness to Google.

To purchase an SSL certificate for your website, you can choose from a variety of options, depending on your website’s specific requirements and budget. Consider factors such as the level of encryption, warranty, and validation needed. This is especially true for e-commerce websites that handle sensitive customer information. Content-driven websites may require less stringent certificates but should still prioritize security.

You can purchase SSL certificates through third-party Certificate Authorities (CAs) like DigiCert, GlobalSign, or Let’s Encrypt, which often provide different tiers of certificates catering to different needs. Alternatively, you can explore options provided by your web hosting company, as many hosts offer SSL certificates as part of their service packages. In either case, take the time to compare features and pricing to ensure you’re selecting the most suitable SSL certificate for your website’s needs.

Should pages on my domain end in a trailing slash?

Search engines consider URLs with and without a trailing slash to be distinct pages. This can lead to duplicate content issues, which may negatively impact your website’s search engine rankings.

Similar to the decision about www or non-www in the domain URL, the decision to use a trailing slash at the end of your domain’s URLs is a matter of preference. As a result, it doesn’t matter whether you include a trailing slash or not. What does matter is that you define one version as the canonical domain’s URL structure.

Keep in mind that Content Management System (CMS) platforms often handle URL structures differently, with some automatically appending a trailing slash to the end of URLs, while others do not. This behavior is typically determined by the platform’s default settings or the way it handles URL generation for pages and posts. You need to be aware of your chosen CMS’s approach to trailing slashes and, if necessary, adjust its settings or utilize plugins to ensure consistency in your URL structure.

Enforcing Your Website’s Canonical Domain

Simply choosing your website’s canonical domain is insufficient. It is entirely possible a person or robot will access your website at a different version of the domain. You need to make sure you clearly communicate the canonical version of your domain via redirects, internal links, and canonical tags. Importantly, make sure not to change your website’s canonical domain.

Redirecting to the Canonical Domain

The best way to do this is with redirects. You want to redirect all other versions of your domain to the canonical version of your domain. For example, if you have selected https://www.mysite.com/ as the canonical domain, then http://www.mysite.com/, https://mysite.com/, and so on all need to be redirected.

With the redirect, you are rerouting people who attempt to access the non-canonical domain over to the canonical version of the domain. This explicitly states you are choosing the canonical version of your domain over all others. You also want to clearly communicate this is a permanent decision, each version should be redirected with a 301 response code.

As well, it is important that the other variations of the domain redirect directly to the canonical version. In an incorrect setup, you might find that http://matthewedgar.net/ redirects to https://www.matthewedgar.net/ which then redirects to the canonical version with both HTTPS and WWW. This creates a chain of redirects or is sometimes also referred to as a double-hop redirect (to indicate the redirect hops through more than one step). The more steps in the chain, the worse it gets—one client we worked with had the http/www redirecting to the https/www, which redirected to the http/no-www version before finally redirecting to the canonical https/no-www version.

These redirect chains can impact the way Google crawls through your website and it is likely Google will stop following redirects at a certain point. As well, redirect chains can also slow down the experience for the user, especially if the server is slow to respond when redirecting. The simple answer? Avoid chains and redirect directly to the canonical version of the URL.

Linking to the Canonical Domain

Search robots rely on links to understand a website’s structure. Robots assume that links generally communicate the preferred version of the link. This is especially true for internal links (links on the website that link to another page on that website). If internal links on the website do not use the canonical domain, robots can start to rank the non-canonical versions of the website’s domain.

Once you’ve selected your website’s canonical domain, every link within your website needs to be updated to reflect the correct version. As part of a regular website audit, you should identify any links that do not use the canonical domain and update those URLs accordingly. Even though the redirect is in place, we shouldn’t force visitors or robots to use that redirect. When updating links on your website, you also want to make sure your XML sitemap includes the canonical version of the domain.

Along with links within your website, any links contained on external profiles should be updated as well. However, these can be harder to update as many of these links may not be within your control. This would include links to your website in local listings and social media. Updating as many links as possible helps to clearly communicate which version of the domain is the canonical version while also saving people the need for any redirect.

Canonical Tags

You also want to communicate the canonical domain within the canonical tags added to each page of the website. For more details about adding canonical tags to your website, you can review my article about duplicate content.

Don’t Change Your Canonical Domain

Once you’ve selected your canonical domain, it is important to never change the canonical domain. Doing so can cause major disruptions in SEO performance. This is because changing the canonical domain changes the URL for every page on your website. A big change like this means Google and other search robots have to recrawl the entire website to find the new URLs and update rankings for every single page. At best, rankings will return after Google has fully processed the change. More often, though, only some of those rankings return.

Changing the canonical domain can happen accidentally during a website redesign. Moving over to a new platform or updating the website’s underlying technology changes how trailing slashes work or drops the www from the domain. This is one of the biggest reasons traffic can drop during a redesign and it is important to do everything you can in a redesign to keep the canonical domain consistent.

Monitoring Canonical Domains: Google Search Console

Add All Domain Versions to Google Search Console

To better understand how Google is crawling, indexing, and ranking each version of the domain, you want to add each domain version to Google Search Console. These can be added to Google Search Console as a URL Prefix property (on the right side of the screenshot below). Note that Google Search Console only supports adding prefix properties for https/http and www/non-www (no trailing slash).

Adding domains to Google Search Console

Along with adding the URL prefix properties for the four versions, you also want to add a Domain property. A domain property allows you to view data about all versions of the domain.

Once all versions are added, you’ll have five versions of the domain added to Google Search Console.

Monitoring For Issues

Some SEOs have said that URL prefix properties are unnecessary because the domain property already contains data about all those prefixes. I respectfully disagree. Due to sampling in Google Search Console’s data, you may be unable to see everything about the domain versions. Adding all versions helps you have the setup you need to fully monitor your website for any issues.

When everything is working correctly, you should only see activity in the Google Search Console property for the canonical version of the domain. However, on larger websites, it is easy for problems to occur. Some pages don’t get redirected properly or the redirect may be broken as part of a deployment. There might be internal links to non-canonical versions of the domain. Google may start ranking the non-secure property due to backlinks not using HTTPS.

Whatever the reason, you can spot these in the Google Search Console URL prefix properties for the non-canonical versions of the domain. Along with checking performance data for the non-canonical domain versions, also check Page Indexing data and review crawl stats. You want to detect any unusual activity on the non-canonical domain versions. This includes an increase in crawl volume, an increase in indexed pages, or non-canonical domain versions ranking in search results.

My recommendation is to check the non-canonical domain versions at least once a quarter to keep an eye out for any issues. This should also be reviewed after any major releases to confirm nothing has changed as a result of that release.

Final Thoughts

Any more, every canonical version of the domain will include HTTPS, unless you don’t care about ranking in Google or users in modern browsers. This leaves you with the choice of WWW or non-WWW and the choice of slash or no slash. Once you’ve made these decisions, implement redirects to route other versions of the domain to the canonical version. As well, be sure to link appropriately to the canonical domain you’ve selected. Monitor Google Search Console to see if any issues appear with how Google is handling your website’s canonical domain and address those issues as quickly as possible.

If you have any questions about canonical domains for your website, please contact me, and let’s discuss your specific situation to make sure you have the best plan in place.

You may also like

Google Search Console: Page Indexing Report

Is Google indexing every page on your website? If not, why not? To answer these questions, you need to use the Page Indexing Report in Google Search Console. Find out how to use and understand this report.

How to Check HTTP Response Status Codes

Every page on every website returns an HTTP response status code. How do you check the status code for your website’s pages? What tools can you use to test status codes? What do the status codes mean?

How To Fix 404 Errors On Your Website

How do you find the 404 errors on your website? Once found, how do you fix the 404 errors? What tools can help? Find out in this in-depth 404 guide!