A canonical URL is the URL of the best representative page from a group of duplicate pages, according to Google¹. For example, if you have two URLs for the same page (such as example.com?dress=1234 and example.com/dresses/1234 ), Google chooses one as canonical. Similarly, if you have multiple pages that are nearly identical, Google can group them together (for example, pages that differ only by the sorting or filtering of the contents, such as by price or item color) and choose one as canonical.
You can set the canonical URL using a canonical tag in your HTML. A canonical tag looks like this:
<link rel=“canonical” href=“https://www.website.com/page/” />
This tag tells Google that the page it’s on is not the canonical URL. The canonical URL is the one it’s pointing to after “href”. You can also set the canonical URL using other methods, such as HTTP headers, sitemaps, or 301 redirects.
You may need a canonical URL if you have duplicate or similar pages on your website that can confuse Google and users. By setting a canonical URL, you can:
- Avoid duplicate content issues that can harm your SEO
- Consolidate your ranking signals and authority to one page
- Prevent link dilution and improve your link profile
- Control which version of your page appears in search results
- Provide a better user experience and navigation
However, you don’t need a canonical URL if you have unique and original pages on your website that don’t have any duplicates or near-duplicates. In that case, you can use self-referencing canonical tags that point to the page’s own URL. This can help prevent accidental duplication by other websites or parameters.
Checking Your Canonical URL
To check if your canonical URLs are working, you can use various methods and tools. Some of the most common ones are:
- View the HTML source of a page: You can open a webpage in your browser and view its HTML source code. Then, you can search for the word “canonical” and see if the canonical tag is defined and pointing to the correct URL.
- Use a canonical URL checker tool: You can use a tool like SEO Review Tools or Semrush to check if a page has a canonical tag and what URL it’s pointing to. You can also check multiple URLs at once and get a report on your canonical issues.
- Use Google Search Console: You can use Google Search Console to see how Google views your canonical URLs. You can go to URL Inspection and enter a URL to see its canonical status. You can also go to Coverage and filter by “Duplicate, submitted URL not selected as canonical” to see which pages have duplicate content issues.
- Use Google Chrome DevTools: You can use Google Chrome DevTools to inspect the HTTP headers of a page and see if it has a canonical header. You can open a webpage in Chrome and press F12 to open DevTools. Then, go to Network and reload the page. Click on the page name and go to Headers. Look for the Link header with rel=”canonical” and see what URL it’s pointing to.
By checking your canonical URLs regularly, you can make sure that they are working properly and that Google is indexing the right version of your pages.