BlogGuidesThe Ultimate Canonical SEO Resource Guide

The Ultimate Canonical SEO Resource Guide

This article is a guest contribution – read more about the author at the bottom of the post. 

Ever wondered what canonical SEO is and how it pertains to your properties? Well, let me assure you, you aren’t the first!

As a technical SEO for a larger company, I see junior specialists and developers struggling to understand what canonical rels are, how/when to use them, and why they have a place in optimization for search engines.

And to be honest, most SEOs agree that the very nature of canonical’s purpose and intent is convoluted.

Today, however, SEO Butler puts to rest any misunderstandings with a comprehensive informational guide surrounding canonicals for SEO purposes.

What is a Canonical Tag?

A canonical tag, also known as a “canonical rel,” or “rel canonical,” is an attribute that defines the relationship a resource has to an HTML document.

It’s often used to define the copy of a page that you wish to present to search engines for indexing.

Using the canonical tag prevents pages from being served in the SERPS under variations of your property you do not want to use.

Because there are four variations of every website, it is of the utmost importance that you are always specifying which variant you want to serve as the “Master Copy.”

Examples of canonical rels and their four variations are as follows:

<link rel=”canonical” href=”>

<link rel=”canonical” href=”>

<link rel=”canonical” href=”>

<link rel=”canonical” href=”>

Knowledge Check:

The word canonical is from the Latin root canonicalis, which means “pertaining to canon” or “according to rule.” As it pertains to canonical SEO, we are simply telling search engines what the rule is for indexing HTML documents and their variants. 

Why Do We Even Have Canonicals in 2019

Why do we indeed? It seems superfluous to have four variations of a website, doesn’t it?

You would think Google, Bing, and Yahoo would pick whatever version they see fit to index best and go with it, right?

While that would make our lives much easier, it would and could also be potentially dangerous for certain web properties. Allow me to explain…

Many websites across the internet use sub-domains and hreflang (another rel attribute) to communicate to search engines that their property may be serving different language versions of the same website.

Negative Repercussions of Not Using Canonical Rels

  • Duplicate content errors
  • Pages not appearing in the SERPS due to being misinterpreted as another page (especially pertaining to hreflang)
  • Crawl Budget deficiencies due to multiple page crawls of the same content

More information on canonical rel issues from Google

In addition, canonicals are also crucial when creating Accelerated Mobile Pages (AMP) pages for mobile, particularly since Google has now expressed that all new properties are indexed by their mobile version first, with desktop being a second priority.

As you can see, because of these different types of websites, canonicals play a crucial role in communicating to search engines which URL to use.

Knowledge Check:

An AMP page, also known as an accelerated mobile page is a document on a website that works in conjunction with your standard pages to serve content at an expedited rate to users using mobile devices. In most instances, these pages are void of JavaScript, videos, and pictures in an attempt to reduce HTTP requests to your server enabling the page to load as swiftly as possible to the user.


When To Use Canonicalization

Let’s keep this short. The only thing you need to remember is that it is crucial to use canonicals. On every page, every project, every time.

Whether it be in the form of a link rel, HTTP header or in your .htaccess file, there is no reason not to use one.

While to a human, all of these pages represent a single page or document on a website, to a search engine crawler they all represent a different place or URL to extrapolate content from.

Because of this, you can see how not using canonicals can lead to duplicate content errors.

Fortunately, most CMS’—like WordPress—actually have a built-in canonicalization system. If set up correctly from the inception of a website, they never need to be touched again (More on this below).

Where and How To Use Canonicals

Now that we have a clear understanding of what a canonical is and when to use one (always!)—it naturally begs the question of how to use them.

Let’s jump right in!

Before we can begin setting our canonicals up on our website or pages, we need first to ensure that our Domain Name Service (DNS) is set up to support our canonical structure.

In many instances, I have seen web designers, SEO specialists, and system administrators slap canonical rels onto the page at the page level, but fail to make sure their DNS records match the vision type they are trying to serve to their users and search engines.

So how do we deal with this? Simply enough. We head over to our domain registrar and begin at the DNS level to make sure everything is consistent.

Editing Your DNS to Support Your Canonicals

Editing your DNS files can be a scary process. Today, we’re going to set you up for success with simple screenshots of text that you can insert right into your records without a complete or comprehensive understanding of all the nuances behind it.

Below I’ll show you how to edit this file for non-www.websites. and www.websites.

For www-Preferred Websites

For www preferred websites, essentially what we need to do is communicate to the DNS that you want your www version to be seen as the canonical.

This is done by simply setting up two records: An “A” Record and a CNAME Record.

Step 1: Log into your DNS provider (We use Google).
Canonicals - Google Domains
Step 2: Select the domain property you wish to manage. For this example, we will select “Tucson’s Trusted.” If you are using Google Domains, on the left-hand side you’ll see the DNS option. Click it.
Step 3: Scroll down to the near bottom of the page and look for “Custom Resource Records.” It will look something like this.

Step 4: To set your preferred vision for www, use the two record types in the above screenshot. The first record type is an “A” record that resolves to the hosting IP Address. The second record is the CNAME record, or “Canonical” Name Record (Making sense yet?!) that points to the www version of the website.

Once you take these steps and all the fields update, press save! This now tells the server and crawlers at the DNS level what your canonical preference is.

For Non-www Preferred Websites

For non-www Preferred websites, we’re going to take the same route above but for steps 1-3 only. The fourth step is a bit different.

In this scenario, were going to set our preferred vision for non-www, rather than www. To do this, we’ll use two record types, as seen in the screenshot below.

Really, we are just excluding the CNAME record in place of another “A” record. Doing so eliminates any canonicalization that search engines may take into consideration at the DNS level.
Canonicals AName
With these steps complete, we can move forward in our process to standardize our preferred vision across our property or domain!

Editing Your .htaccess File to Support Your Canonicals

Next, we come down to the HTTP line from the DNS to support our canonical topography.

The information below is controlled and handled through the .htaccess file. It’s geared towards making sure that after your DNS resolves to your IP, your host understands what URL path you prefer for traffic.

Below, I’ll show you how to edit this file with simple copy-and-paste codes for your .htaccess file.

For www-Preferred Websites

Step 1: Establish an FTP connection to your domains root folder. Inside this folder, there shouldl be a .htaccess file. If there is not, please create one.

Step 2: Right-click the file and select edit. This will bring up the document in your file editor of choice.

Step 3: For www-preferred websites without https, add the Apache code below:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^ [NC]

RewriteRule ^(.*)$$1 [L,R=301]

For www and https use:

RewriteCond %{HTTP_HOST} ^$

RewriteCond %{SERVER_PORT} ^443

RewriteRule ^(.*)$$1 [R=301]

Note: Make sure to replace with your actual domain. 

Step 4: Please save your file and rewrite the old one.

For Non-www-Preferred Websites

Step 1: Establish an FTP connection to your domains root folder. Inside this folder, there should be a .htaccess file. If there is not, please create one.

Step 2: Right-click the file and select edit. This will bring up the document in your file editor of choice.

Step 3: For non-www preferred websites without https, add the Apache code below:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^ [NC]

RewriteRule ^(.*)$$1 [L,R=301]

For non-www and https use:

RewriteCond %{HTTP_HOST} ^$

RewriteCond %{SERVER_PORT} ^443

RewriteRule ^(.*)$$1 [R=301]

Note: Make sure to replace with your actual domain.

Step 4: Please save your file and rewrite the old one.

After you have completed these steps, we can now move on to setting up on-page canonicals!

This is the final step in making sure that search engines understand the exact way you want your website seen in their results pages.

If you’re having trouble understanding the code above, check out these resources below for apache generated redirects in your .htaccess file.

It’s also important to note that depending on which version of Apache your server is running, the code may be written slightly differently in order to execute these commands.

Here are two resources that may be of further assistance should you need it.

Editing Your Page to Support Your Canonicals

As discussed previously, if you are using a CMS (Content Management System) like WordPress, you can use their integrated turnkey process in one step to set your canonicals at the page level.

How you ask? Quite simply.

Head over to your back end administration panels and select “Settings” and then “General.” Underneath General, you’ll see the options from the screenshot below:
WordPress CanonicalsAll you have to do here is write out your website in the exact way that you want WordPress to match your link rel canonicals to.

Simple enough, right?!

How about if you don’t have WordPress and are working on a static HTML website with custom CSS and PHP modules?

Almost as easy!

For static pages, add the snippet of code below to your website in the header. This code lets search engines know this is the preferred vision you want your page indexed as.

Those rels are as follows. How you set up your DNS and your .htaccess 301 redirects determines which link rel you should use. Remember to make sure it matches, so there isn’t any inconsistent content indexing across the SERPs.

<link rel=”canonical” href=”>

<link rel=”canonical” href=”>

<link rel=”canonical” href=”>

<link rel=”canonical” href=”>

After your rels have been added, make sure they’re verified on the page you’re working on. This can be done by inspecting the page source and hitting <ctrl + f> to search “Canonicals”.

It will look something similar to this:

Optimizing Your Canonicals for External Resources

With the advancement of cloud based applications, servers and content delivery networks, delivering traffic to named resources rather than IP addresses is of extreme importance.

When not done incorrectly it can lead to inconsistent record serving and crawling confusion from search engines.

A quick Google of “CDNS hurt SEO” will show you that when improperly set up, many properties experience loss of traffic due to SERP related de-indexing.

Setting up alias record types enables you to associate a named resource with a root. An example of a named resource would be

In our case for the purposes of this explanation we would be directing to This leads to less integration issues between the named resource and your canonical URLS.

Note: The alias record is set up on your cloud of choice or content delivery network. It is a virtual record type to provide CNAME-like behavior on root or apex domains and causes any name to resolve to an IP address.

Understanding The Differences

An A Record maps a name to an IP address.

The CNAME record maps a name to another name (www to non www, giving us a canonical of www)

The Alias record maps a name to another name ( to

Take Away: CNAME and ALIAS records map names to other names (www website or sub domains) and A records resolve to an IP.

Final Thoughts About Canonicals for SEO

If you made it to the end of this article, I hope that you have a newfound understanding of what canonicals are and why they are essential to search engine optimization.

While many believe that canonical implementation is not as necessary as it once was, I would argue that it is even more so. With the ongoing war Google is waging to make AMP pages more relevant, and its recommendations for language-specific sites in some niches, canonicals are more crucial than ever.

Remember SEO’s, optimize to prepare for the future with the present in mind.

You don’t have to be better than everyone else, but you do need to execute more efficiently than your competitors—even when it comes to canonical SEO.

[author_bio image=”×150.png” name=”SCHIELER MEW”]Schieler Mew is a Digital Marketing Strategist and Comprehensive SEO consultant that has worked with Fortune 500 companies all the way down to local SMB’s. He specializes in advanced SEO theory and technical concepts to help online businesses thrive in evolving and volatile markets. Schieler is the owner of <a href=””>Viictory Media</a>[/author_bio]

6 thoughts on “The Ultimate Canonical SEO Resource Guide

  1. Wow! Great information! This has been such an area of confusion for me and honestly a topic that I’ve been avoiding at all costs or passing on to my colleagues to deal with. Thanks for the solid information and making it easy to follow!

  2. This is a wonderful article. I had never understood what a CNAME is, and only knew that it was best practices to use one.
    For proper clarification, this article is suggesting to use double A records if there will be no www in the URL because www is a CNAME canonical, is that correct? Fascinating! I did not know there was another way.

    1. Jordan,

      That’s correct. You should only be using a CNAME to communicate between your dns and hosting that you’re planning to reference www. as the canonical.

      In contrast using an A record will forward www to the IP and communicate that there is no Canonical-Name (subdomain).

      I hope this further clarified things! Thanks for reading.

  3. Very informative. I knew there was four variations of every website, but I didn’t realize google would decide if you didn’t specify. Thanks for the thorough breakdown!

  4. I love how the author went for the latin explanation lol. I have never seen that before in an SEO article. Usually only in textbook knowledge from colleges and schools.

Leave a Reply

  • Services
  • Resources
  • Cart
  • Checkout

Free Guest Post Database

1,500+ Sites

Sign up to receive our free guest post database list where you can start your link building campaign for free !