Explanation of “Links pointing to non-canonical URL” issue
By Sean Needham
This article explains how to address the issue of “Links pointing to non-canonical URL" when highlighted in Siteimprove SEO.
A canonical tag can be used to indicate which page you’d like a search engine (e.g. Google) to index when you have multiple pages with very similar/identical content on your website.
For example, if the two pages below have very similar content, and you’d prefer that the first page appears in search engine results, you could add this canonical tag code to the second page.
<link rel="canonical" href="https://www.mysite.com/shoes" />
A page with a ‘canonical' tag pointing to another page is often referred to as a ‘non-canonical’ page.
Links pointing to non-canonical URL
When a site uses a canonical tag, it's best practice to make sure that the URL within the canonical tag is only being used on the site.
let's say www.example.com/test/product-A/ has a canonical tag pointing to www.example.com/product-A/.
The best practice is to make sure any other pages on your site also link to www.example.com/product-A/ (the canonical URL) rather than the non-canonical URL, www.example.com/test/product-A.
Within the issue "Links pointing to non-canonical URL" you’ll see 3 columns.
- The non-canonical URL
- Canonical target URL
- Referring pages.
The check shows that all of the Referring Pages contain a link for the non-canonical URL somewhere on the page.
The solution is to find the non-canonical link on the referring page and replace it with the canonical URL.
Looking at the earlier example:
www.example.com (referring page) has a link on its homepage to www.example.com/test/product-A/ (non-canonical). The site will need to be edited to replace the non-canonical URL with www.example.com/product-A/ (canonical target URL).