A product page might be reachable through several URLs: one with tracking parameters, one with a category path, and another with a trailing slash. To a visitor, those addresses may show the same content. Search engines can treat them as separate URLs, which may divide signals and make it less clear which version should appear in search results.
Knowing how to use canonical tags helps you point search engines toward the preferred URL without removing useful alternate versions. Canonicals are especially helpful for duplicate or very similar pages, but they are not a substitute for redirects or a fix for every indexing problem. The key is to choose the right primary page, use a consistent URL, and check that the rest of your site supports that choice.
What a canonical tag does
A canonical tag is a piece of HTML in a page’s <head> section. It identifies the URL you consider the preferred version of that page. It commonly looks like this:
<link rel=”canonical” href=”https://example.com/products/blue-mug/”>
The URL in the href attribute is the canonical URL. Search engines can use it as a clue when deciding which version to index and show in results. A canonical is a signal, not a command: search engines may choose a different URL if other evidence, such as internal links or redirects, points elsewhere.
Canonical tags are useful when alternate URLs need to remain accessible. For example, a shopping filter may create a URL that sorts products by price. Visitors can use that view, while the canonical can point to the main category page if the filtered version does not deserve its own search listing.
How to use canonical tags on your site
1. Find URLs with the same or very similar content
Start with a specific group of pages rather than adding canonicals sitewide without a plan. Look for duplicate versions caused by:
- Tracking parameters, such as campaign tags added to links
- Sorting, filtering, or session parameters
- Different URL formats, such as a trailing slash or no trailing slash
- HTTP and HTTPS versions, or www and non-www versions
- Product pages reachable through multiple category paths
- Printer-friendly or alternate page versions
A crawl of your site, your content management system’s URL reports, or a manual review of known URL patterns can help uncover these cases. Compare the page content and purpose, not just the addresses. Two pages that cover different products or answer different questions generally should not be treated as duplicates just because they share a template.
2. Choose the preferred URL
Pick the version you want people and search engines to use. Consider which URL is stable, useful to visitors, and already supported by your site’s links. If the page has an established clean URL, that is usually a sensible choice.
Use one consistent format. For example, choose HTTPS and decide whether your site uses www. Keep capitalization and trailing slash conventions consistent with your existing URLs. The canonical should point to the final, preferred address, not to a URL that redirects somewhere else.
3. Add the canonical tag to each version
Place the tag in the HTML head of the duplicate or alternate page. In most cases, use an absolute URL that includes the protocol and domain. If several alternate URLs should consolidate into one page, each one can point to that same preferred URL.
Most content management systems and SEO plugins let you set a canonical URL in a page’s settings. Check what the tool outputs before adding a second method. Two conflicting canonical tags can make the signal unclear. For a page with no meaningful duplicates, a self-referencing canonical, where the page points to its own preferred URL, can help reinforce the URL you intend to use.
4. Align your other signals
A canonical works best when your site consistently treats the chosen URL as primary. Update internal links to point directly to the canonical version. Include the preferred URL in your XML sitemap, and avoid linking to alternate versions unless visitors need them.
Also check redirects, navigation, and page metadata. If an alternate URL redirects to the preferred one, the redirect already consolidates access; a canonical on the destination can still identify that destination as preferred. If your site has a broader issue with pages missing from search, review this checklist for pages that are not indexed rather than assuming a canonical tag will solve it.
When to use a canonical, a redirect, or neither
Use a canonical when alternate pages need to stay available, but you want search engines to treat one URL as the primary version. Tracking parameters are a common example: a tagged URL may be useful for analytics, while the underlying page remains the preferred search result.
Use a permanent redirect when an old URL should no longer load as a separate page. If you have moved content to a new address or permanently standardized URL formats, redirecting the old version sends visitors to the replacement and consolidates the URLs more directly.
Use neither when pages are genuinely distinct and each has a useful purpose. For instance, separate product variants may need their own search listings if they have distinct content and serve different needs. Pointing all of them to one page could make the wrong URL appear in search, or discourage search engines from indexing useful pages.
Do not use a canonical as a way to hide low-quality pages, force unrelated pages into one result, or resolve a page that should be removed. Choose the action that matches what you want visitors to experience.
How to check whether your canonicals are working
After publishing a change, inspect the page’s source or use your browser’s developer tools to confirm that the canonical tag appears in the head and points to the intended URL. Check both the preferred page and a few alternate URLs. Make sure each alternate uses the same intended destination and that the destination loads successfully without redirecting.
Then review the site signals around those pages:
- Internal links point to the preferred URL.
- The preferred URL is included in your sitemap, if it belongs there.
- Alternate versions do not have conflicting canonical tags.
- The canonical page is accessible to search engines and is not blocked from crawling.
- The preferred URL returns a successful page rather than an error or redirect.
Search tools may report a selected canonical that differs from your declared one. Treat that as a reason to investigate, not as proof that the tag is broken. Compare the page content, redirects, internal links, and sitemap entries. If those signals disagree, make them consistent and allow time for search engines to recrawl the pages.
Common canonical tag mistakes to avoid
- Pointing every page to the homepage: Each canonical should represent a genuinely preferred version of similar content, not funnel unrelated URLs to one destination.
- Using a URL that redirects or returns an error: Canonical targets should resolve directly to a usable page.
- Creating a canonical loop: If page A points to page B, page B should not point back to page A.
- Mixing URL formats: Choose one preferred protocol, host, and path style, then use it consistently.
- Forgetting updated links: Canonicals provide a signal, but links to alternate URLs send mixed messages.
Canonical tags are most effective as part of a clear URL policy. Identify the duplicate versions, choose the page that should represent them, and make your tags, links, sitemap, and redirects agree. That gives search engines a consistent picture of which URL matters while keeping alternate versions available when your visitors still need them.
