One of the most fundamental aspects of SEO is selecting and enforcing a canonical domain for your website. In this article, I will review what a canonical domain is and explore the decision-making process for selecting the most effective domain structure. This includes making decisions about www or non-www, using Top-Level Domains (TLDs) and using subdomains or subdirectories.

What is a Canonical Domain?

What exactly is a canonical domain, and why does it matter to your website’s SEO performance? 

A canonical URL is the official or preferred version of a page’s URL, and defining it helps resolve duplication. Typically, “canonical” within SEO refers to a specific page’s URL, but we can apply this 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 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”, and with or without a trailing slash at the end. 

With that in mind, there are eight distinct ways to access my own domain:

  • http://matthewedgar.net
  • http://matthewedgar.net/
  • http://www.matthewedgar.net
  • http://www.matthewedgar.net/
  • https://matthewedgar.net
  • https://matthewedgar.net/
  • https://www.matthewedgar.net
  • https://www.matthewedgar.net/

If each variation returned content, my website’s pages would be available at eight unique URLs. If no canonical domain structure is selected and enforced, search robots will find it harder to crawl through a website and determine which version of the page to index, which can significantly impact SEO performance. I’ve seen sites lose traffic because these variants were not properly handled, resulting in duplicate content.

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.

Why Are Domain Variants Considered Duplicates?

A question I get from clients is why would Google treat these variants as duplicates? Why would trailing slashes or www usage matter? Why wouldn’t their robots be smart enough to reconcile the duplication? 

I agree, you would think Google would be able to figure it out. Occasionally, though, 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://www.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. In other cases, this might be an intentional choice. Whatever the reason, because these differences can happen, Google treats each version as a separate URL.

To avoid duplicate content problems, you must select your official domain structure. To select a canonical domain structure, you need to make a few related decisions: whether the site should use HTTPS, whether the canonical version includes www, whether URLs use trailing slashes, whether new sections belong in subdirectories or subdomains, and what TLD the site should use.

Selecting Your Canonical Domain Structure: Initial Questions

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

The short answer is yes. Almost every website uses an SSL certificate, and major browsers will warn visitors if you don’t have one. While it may not drastically affect rankings directly, using HTTPS is part of Google’s page experience factors and communicates trustworthiness. Browsers will also show non-secure errors if you try to access a site without an SSL certificate.

Many hosting companies provide an SSL certificate. Cloudflare also provides an SSL certificate, including providing SSL certificates for WPEngine sites.

Should my domain include a www or not? 

It is a matter of preference whether your canonical domain includes www. From an SEO perspective, websites can rank with or without it. Sites can also appear in AI responses with or without the www. What matters is that you only allow your website’s content to be available with one version and that you redirect the other version to the canonical version. In deciding whether to use www, think about what looks normal for your brand and your audience. Some audiences may find www more familiar, while others may prefer the cleaner non-www version.

Should pages on my domain end in a trailing slash? 

Similar to the “www” decision, using a trailing slash at the end of your domain’s URLs is a matter of preference. In some cases, it is a technical necessity with a CMS enforcing a specific trailing slash usage. Whatever you decide to use, Search engines consider URLs with and without a trailing slash to be distinct pages, so what matters is that you define one version as the canonical standard to avoid duplicate content.

Watch this one during CMS migrations because platforms handle trailing slashes differently. A platform change can create a sitewide URL change even if nobody intended to change the canonical domain structure simply because one CMS added trailing slashes and the other did not. Be intentional about how you use trailing slashes and factor this into your evaluation before a site merger.

Structuring Content: Subdirectory or Subdomain?

Canonical domain decisions are not only about the root domain. They also affect how you organize major content sections within your domain. You have two choices for different sections of content: should you use a subdirectory (or subfolder) or a subdomain?

Diagram showing subdomain vs subfolder.
  • A subdirectory (or subfolder) is part of your main domain. In the case of this website, the main domain is matthewedgar.net. A subdirectory for my blog may look like matthewedgar.net/blog, where “blog” is the name of the subdirectory.
  • A subdomain is a domain that is part of your website’s primary domain but is distinct and separate. For instance, I could add a subdomain for photos at the URL photos.matthewedgar.net. This distinguishes the “photos” domain as something separate but still connected to the main domain.

You can think of a subdomain as almost a separate website, where a subdirectory is part of the same website. The question is which configuration is best technically and best for your users. You want to make this decision and enforce it consistently so that your comment stays on a singular, canonical URL.

When to use a Subdomain vs. a Subdirectory

Subdomains and subdirectories both have their place and purpose. Both can rank in search results. Both can drive conversions. Both work technically. However, in some situations, a subdomain is more appropriate than a subdirectory, and in other situations, a subdirectory is a more appropriate solution.

Subdomains make sense for content that targets a very specific audience distinct from the main domain, such as support content intended only for specific types of users. They are also helpful for technical considerations, such as when your blog and e-commerce platform require incompatible hosting technologies. 

Subfolders or subdirectories are ideal for closely connected content, like a blog or product pages. If visitors would consider a section of content to be a part of your website, then hosting that content on a subdomain with a unique design might lead to confusion and frustration.

How Does Google Handle Subdomains?

Google’s site diversity system is designed to differentiate sites that appear in search results. This system typically evaluates subdomains as part of a root domain. In this sense, then, it doesn’t change how your website will rank in search results if your content is in a subdirectory or on a subdomain.

Google also addressed this with their Helpful Content Updates. In 2023, Google said, “If you host third-party content on your main site or in your subdomains, understand that such content may be included in site-wide signals we generate, such as the helpfulness of content.” In other words, if there is low-quality (unhelpful) content on a subdomain, Google may consider everything on your domain to be unhelpful. 

Since 2023, Google has removed this language from their official documentation. However, based on what I’ve seen across client websites, the same logic can apply: low-quality content can prevent the subdomain and the main website’s content from ranking. That means, a subdomain is not an effective place to hide unhelpful content.

International & Multilingual Considerations 

If you are targeting international audiences, Google supports subdomains, subfolders, or country-specific domains (ccTLDs). Any of these can work and rank well in search results. It also appears that all types can perform well in AI citations and mentions.

A ccTLD is the clearest way of indicating you are targeting a separate country entirely, and Google will treat it as a completely different website. For example, Amazon uses a country-specific domain. The US website is amazon.com, Canada’s website is amazon.ca and the UK website is amazon.co.uk. In this case, then, you have multiple canonical domains for different countries.

A subdomain is most often used for presenting the website in a different language to a distinct audience. For example, AirBNB’s Spanish version of the US website is available at https://es.airbnb.com/. Spanish content, in this example, would consistently use the subdomain as the canonical domain.

Subfolders are an acceptable solution as well, though they may not always create a clear enough separation between audiences. To get around this, you can use multiple subfolders with one for country and one for language. For example, United Airlines uses subfolders with one level for language and another for country. The US website is located at https://www.united.com/en/us, while the UK website is located at https://www.united.com/en/gb. Because these are all on the same domain, this can get tricky and make it harder to stay consistent with usage in canonical domains. If you use this method, make sure you have rules in place to appropriately define and enforce the appropriate subfolders.

What TLD Should Your Website Use? 

Canonical domain choices also include the domain itself. A top-level domain, or TLD, is the suffix at the end of your domain name. In the case of my domain, matthewedgar.net, the TLD is “.net”. In the case of Elementive’s domain, elementive.com, the TLD is .com. There are lots of different TLD options available. For example, non-profits tend to use “.org” and educational institutions tend to use “.edu”. Outside of the USA, it is common to have a country-specific top-level domain, such as “.ca” for Canada.

My default recommendation is to stick with the standard: pick a domain with the .com TLD. The .com TLD is used by 43.6% of all websites worldwide. Given this popularity, there is familiarity with this TLD, and that may give people greater reason to trust your site, resulting in better clicks. (For non-profits and educational institutions, this would be true for .org and .edu TLDs).

If you absolutely cannot find a domain with a .com, alternative TLDs like “.io”, “.ly” or “.co” can be a reasonable choice. In my experience, clients using non-.com TLDs mostly get the same click-through rates from search results. Very rarely, the alternative TLD looks suspicious and may deter clicks. Be mindful of this as you select your TLD.

Pro tip: I also recommend purchasing every TLD-variant you can for your chosen domain name to protect your brand. That way, somebody else can’t spoof your brand on a nearly similar domain (yoursite.co vs yoursite com). Be sure to redirect these variants to the chosen canonical domain, with the redirect returning a 301 response status.

Enforcing Your Website’s Canonical Domain

After choosing your website’s canonical domain structure, the next step is to enforce it.

  • Redirects: Redirect all pages on all other versions of your domain to the canonical version using permanent 301 redirects. Ensure they redirect directly to the canonical version to avoid slow, redirect chains.
  • Internal Links: Every link within your website needs to be updated to reflect the correct canonical domain. If internal links do not use the canonical domain, robots can start to rank the non-canonical versions even if redirects are in place.
  • XML Sitemap: The links presented in the XML sitemap should also use the canonical domain to avoid conflicts that could confuse robots about which pages to rank.
  • Canonical Tags: Communicate the canonical domain within the canonical tags added to each page.
  • Hreflang tags: An hreflang tag explains how international and multilingual content relate to each other. These tags should use the canonical domain. (Learn more about hreflang tags.)
  • Schema URLs: Any URLs referenced in schema markup should use the canonical domain. This is especially important since schema can help establish authority.
  • External Links: As much as possible, external links should also use the canonical domain. That can be difficult for external links you do not control, but focus on using the canonical domain on social profiles or local directories.

Don’t Change Your Canonical Domain

Once you’ve selected your canonical domain, it is important to never change it, or at least minimize the changes. Changing the canonical domain changes the URL for every page on your website. This forces Google and other robots to recrawl your entire site and update rankings. 

Even changing your TLD presents massive risks. For example, if you previously configured your website with a non-.com TLD, there is usually little advantage in moving to a .com. This is why I still use the .net TLD for this site and haven’t migrated to the .com, even though I do own both variations. 

Traffic fluctuations and drops are common following a canonical domain change. I see this change happen often during website redevelopment projects. Usually, it is accidental that a redirect is added to force www instead of excluding www (or the reverse). In those cases, it would have been easy to advise a canonical domain switch. 

Sometimes, though, the canonical domain changes because the website moves from one platform to another, and the new platform doesn’t support the same decisions about www usage or trailing slashes. In these cases, the best you can do is redirect to the new canonical domain and update all internal references to support the new canonical domain.

More than anything, though, my top recommendation is to protect your canonical domain during a website migration to avoid a traffic loss. Across hundreds of website migration projects, I’ve never seen a canonical domain change result in a traffic boost. Only change your canonical domain if you are undergoing a major brand change anyway.

Monitoring Canonical Domains: Google Search Console

To better understand how Google is handling your setup, add all versions of the domain (http/https, www/non-www) as URL Prefix properties to Google Search Console, along with a Domain property. Adding all versions ensures you don’t miss hidden issues due to data sampling. Check the non-canonical domain versions at least once a quarter for unusual indexing or crawl activity to confirm your redirects and links are working perfectly.

Recap: Selecting Canonical Domain

In practice, I’d make these decisions in this order: 

  • Choose the domain name and TLD that make the most sense for your brand and audience. Pick something that works long-term.
  • Decide whether new sections belong in subdirectories or subdomains based on the audience, content quality, international/multilingual considerations, and technical constraints. 
  • Use HTTPS. Your hosting company should provide an SSL certificate and this should not be a difficult thing to configure for your domain.
  • Pick either www or non-www, whatever you prefer for your brand and whatever your customers will find the most appropriate.
  • Choose a trailing slash standard. Often, this is dictated by the CMS platform you are using.

None of these decisions is complicated on its own. The problems happen when the decisions are inconsistent across redirects, links, sitemaps, hreflang tags, schema, and canonical tags. The most important step is that once you’ve made these decisions, implement redirects to force the canonical domain choice and minimize changes to the canonical domain selection going forward. To support the canonical domain, update your internal links and other signals to support the canonical domain. Finally, rigorously monitor Google Search Console to protect your SEO performance.

If you have any questions about canonical domains, subdomains, TLDs, or other aspects of technical SEO, please contact me.