Canonicalisation issues arise when website content that has more than one possible URL. The most common scenarios are:
- URLs with tracking parameters and Session IDs
- Product variations e.g. different colours or other specifications
Best Practice
- Ensure all internal links within your website point to the primary URL (also known as the canonical), rather than the duplicate URL versions of the same content
- Never set canonical tags to expired, redirecting, or erroneous content
- Ensure the canonical includes the full URL address including the domain
- Never set canonical tags in URLs that are disallowed in the robots.txt file or on pages with the
noindex
tag. - Ensure the HTTP header canonical link matches the one set in the HTML
- If the user does not need to view the non-canonical URL version of the primary URL: Use 301 redirects in .htaccess server file to permanently redirect the non-canonical version to its primary URL:
Redirect 301 /non-canonical/ http://artios.io/primary-url
- If the user does need to view the non-canonical URL version of the primary URL: Use the
rel="canonical"
tag in web pages inserting the following inside the<head>
tag:
<link rel="canonical" href="http://artios.io/canonical-url">
- If in doubt, set the
rel="canonical"
tag to self canonicalise inside all of the primary URL pages. This prevents the crawl and indexing of tracking parameters such as “utm_campaign”, for example