Correct application of Canonical tags is a prerequisite to a great SEO. Faulty implementation of these tags may impact your site’s SEO and performance on SERPs. Setting up canonical tags correctly is a crucial practice in SEO and website content management. In this post, we will cover the details of what are canonical tags, their importance, and how to set them to improve site performance and ranking.
Page Contents:
What are Canonical Tags?
A Canonical Tag, also known as “rel canonical” is an HTML Tag in the source code of the page that indicates to search engines that a master copy of the webpage exists. It points to the standard resource and is used for indexing results in search engines.
If you have the same or similar content available under different URLs, canonical tags can be used to define which version is the main one and therefore should be indexed. They help prevent duplicate content issues if you have different versions of the same page.
How does a Canonical Tag look like?
It appears in the <head> section of the page and appears as shown below.
<link rel=“canonical” href=“https://example.com/sample-page/” />
Here,
link rel=”canonical”: The link in this tag is the main (canonical) version of the page.
href=“https://example.com/sample-page/”: The canonical version can be viewed at this URL.
The following two URLs have the same content.
https://www.example.com/example.htm
https://www.example.com/examplepage/?session_id=xyz.htm
In the above example, as the first URL is relevant, it should become the main version and a canonical tag should be inserted into the head section of the second URL to refer to the first link. This will signal Google that the first URL should be crawled and indexed to rank on SERPs.
Importance of Canonical Tags
Canonical Tags was introduced in the year 2009 to help webmasters, marketers restrain duplicate content issues accessible on several URLs. Canonical tags are used to specify the URL that you want search engines to crawl and index.
It is imperative to use Canonical Tags when the same or similar content already exists on more than one URL. If there are several copies of the same content, search Engines don’t know which webpage to display on the search results.
Though, Google does not impose penalties on duplicate pages, hosting copied pages may adversely affect your search engine optimization tactics. Using Canonical tags for every identical set of URLs improves the SEO of the site.
Also, duplicate content on your site impacts the ‘crawl budget’. If your site has too many duplicate links, Google has to crawl multiple versions of the same page thereby consuming more time instead of finding other important site content.
While adding a URL to the Canonical tag, make sure to always include the complete website URL. Your site URL should contain the following:
- The HTTPS://
- The www
- Your domain name
- The .com part
Search Engines will not consider Canonical tags in the following situations
- Difference between the canonical URL and canonicalized URL.
- Page not containing a canonical tag
- Multiple canonical tag pages.
- Blocking the canonicalized URL via robots.txt
- Canonicalising to the incorrect URL.
- Canonical URL redirecting to a different URL.
- Setting a 4XX HTTP status code for a canonicalized URL
- Empty Canonical URL.
- Broken Canonical URL.
Rules of using Canonical Tags
- Include the full URL in the tag: Instead of using the URL <link rel=“canonical” href=”/sample-page/” />, add the complete URL such as <link rel=“canonical” href=“https://example.com/sample-page/” />
- Either use a slash or don’t use a slash at the end of the URL.
- Don’t mix uppercase and lowercase characters together: It is advised to use lowercase URLs and avoid using both uppercase and lowercase characters together.
- Character codes should be inserted consistently throughout the text or not used at all.
- Adopt Google Webmaster Tools to specify how Google should handle parameters.
- Use a single canonical tag per page.
- Always use the correct domain version (HTTPS vs HTTP)
Canonical Tags Best Practices
Canonical tags and Pagination: If the pagination is implemented on the view-all page where all products are visible in one overview, it is recommended to canonicalize all the paginated parts to the complete version. This practice ensures that these pages can be found and indexed by search engine bots.
Canonical tags and hreflang: A website should either use a canonical tag or not use it at all. If both canonical tag and hreflang are used, it sends a conflicting signal to Google. Tag hreflang depicts that there is another language version of the webpage available whereas the Canonical tag signals to Google the present version is the original version.
Canonical tags and Noindex: A website should either have a Canonical Tag or Noindex tag. Noindex tag conveys to search engines that a webpage should not be indexed whereas canonical tag signals to Google that the particular webpage can be indexed. Hence, it is important to choose between the two as the presence of both tags makes the message unclear affecting the site performance and SEO.
How to set Canonical Tags?
- HTML Tag (rel=canonical)
To implement the rel=canonical tag, simply add the following code in the<head> section of the page as shown below
<link rel=“canonical” href=“https://example.com/canonical-page/” />
Example- Suppose you have an eCommerce store selling stationery items. You want https://yourstore.com/color/watercolor/ to be the canonical URL, even though that page’s content is accessible via different URLs (e.g., https://yourstore.com/offers/watercolor/). You need to add the following code to the duplicate pages: <link rel=“canonical” href=“https://yourstore.com/color/watercolor/” />.
If you are using a CMS like WordPress or Shopify, then you need to take the following steps.
Canonical tags in WordPress: Install the plugin Yoast SEO, and self-referencing canonical tags will be added by default to it. You can set ‘custom’ canonicals in the ‘advanced’ section on a page or post.
Canonical tags in Shopify: Shopify has a built-in set of self-referencing canonical URLs for different product and blog posts category.
- HTTP Headers
You will need to use HTTP Headers to set canonicals for documents files such as pdf as it has no page <head> section. To insert canonical tags in a pdf file, open the .htacccess file and in the header add the link command to create a canonical tag. Thereafter, you can submit the URL to Google Search Console so that it can be crawled and indexed by search engine bots.
- Sitemaps
As per Google guidelines, only canonical URLs should be included in the sitemaps and non-canonical pages should not be added. This is because pages listed in the sitemap are viewed as suggested canonicals.
- 301 redirects
301 redirect is used to move the traffic from the duplicate URL to the canonical version of the link. If your site is reachable through different URL versions, simply choose one URL as the canonical version and redirect the other URLs there.
Canonical Tags should be an essential component of every site’s architecture. Implemented correctly, they can help guide Google in understanding and ranking the right web pages for your site. You can view the URL inspection tool in Google Search Console to see both user-declared and Google-selected canonical. Canonical tags are important for a great SEO, however, they require a bit of analysis and learning to execute them in the proper manner.
Hope this guide has helped you solve your concerns regarding Canonical Tags. Visit serpok.com for more interesting and valuable information related to SEO and digital marketing!