When multiple URLs provide identical or very similar content, first choose the URL you want users to see in search results. Then point the duplicate versions to it with canonical tags. The representative page should also point to itself; this does not create a redirect loop. If the other URLs are to be retired, use permanent redirects instead. Google treats these settings as signals for choosing a canonical URL, not a guarantee that it will select your preferred version. Leaving them unset does not necessarily mean the site will perform poorly.
Check the content and purpose before choosing a representative URL
What matters is whether the content at each URL is identical or similar, not whether the pages share code. Check what each URL displays and whether it still needs to remain accessible to users before deciding how to specify a canonical URL.
- Choose the URL you want to appear in search results, such as the main product page rather than a URL with tracking parameters that displays the same content.
- Google generally prefers HTTPS, but there are exceptions. These include invalid certificates, certain insecure resources the page depends on, and conflicting settings such as HTTPS pages redirecting or pointing via canonical tags to HTTP URLs.
- Internal links should consistently use the chosen canonical URL to help Google understand the site’s preference.
According to Google’s documentation, specifying a canonical URL can help consolidate signals from duplicate pages, simplify metrics tracking, and reduce duplicate crawling. It does not guarantee higher rankings.
Use canonical tags to keep duplicate URLs available and redirects to retire them
If multiple URLs need to remain available, add a link element with rel=”canonical” to the head section of each HTML page, pointing to the representative page’s full absolute URL. For non-HTML documents such as PDFs, you can specify the canonical URL through an HTTP response header. Google supports this header method only for web search results.
Use either the HTML element or the HTTP header, rather than both, to avoid conflicting settings. To retire duplicate pages, use a permanent redirect, such as a 301, to send users to the URL you are keeping. A sitemap can also list preferred URLs, but it is a weaker signal and cannot replace explicitly mapping each duplicate page to its canonical URL.
Three URLs that share code and identical content can all point to the same page
Using a scenario from a public discussion, suppose the following three URLs have identical content and the first is chosen as the representative URL:
- https://www.example.com/product/foo
- https://www.example.com/product/foo?id=1
- https://www.example.com?product=foo
All three pages can output the same setting: <link rel=”canonical” href=”https://www.example.com/product/foo”>. The first page points to itself. This is called a self-referencing canonical and is also the approach recommended in Google’s documentation. The other two pages designate the first as the preferred version. This does not keep sending the browser from one URL to another, so it is not a redirect loop.
Check that all settings point to the same version
When a canonical tag points to the representative page, the sitemap should not list a different duplicate version as the preferred URL. Do not use robots.txt blocking or the URL removal tool as a substitute for canonicalization. Google does not recommend using noindex to choose canonical URLs within a site because it prevents the page from appearing in search results.
If the site uses JavaScript, set the canonical URL in the original HTML whenever possible and avoid having scripts change its target. If it cannot be set in the original HTML, provide it only through JavaScript to avoid conflicting settings.
Canonical URLs: perspectives from across the web
If category and product pages share some content, should they point to the same canonical URL?
Category and product pages should not point to the same canonical URL simply because some content overlaps. One discussion cautions against using canonical tags to point a category page listing multiple products to an individual product page, or vice versa. Another notes that if each product page has substantial unique content, sharing some sections does not make the entire page a duplicate. Compare each page's main content and purpose before deciding whether they are duplicate or near-duplicate versions.
If Search Console reports an alternate page or a missing canonical URL, do I need to make changes immediately?
Not necessarily. If it reports “Alternate page with proper canonical tag” and the correct representative page has been selected, no action is usually needed. If it reports a duplicate page without a user-selected canonical, consider adding a canonical tag to indicate your preference. You can also use the URL Inspection tool to check crawling status and canonical URL selection, confirming whether Google can access and interpret the page as intended.
Will duplicate content definitely incur a ranking penalty if no canonical is set?
Not necessarily. One article argues that leaving the canonical URL unspecified affects rankings, while another says the commonly cited “duplicate content penalty” does not exist. Google's documentation also explains that sites without a specified preferred URL can still perform well, and Google will choose a version itself. Setting a canonical URL indicates a preference and helps consolidate signals. It should not be presented as something you must do to avoid a certain penalty.
If the directory containing the canonical target is blocked by robots.txt, will the short URL also be blocked?
In the example from a public discussion, blocking the directory containing the canonical page does not also block a separate short URL outside that directory. However, it prevents search engines from viewing the designated canonical page, defeating the purpose of the setting. Google's documentation also cautions against using robots.txt for canonicalization: a URL may still be indexed after crawling is blocked, but without its content. Check the access settings for the short URL and the target page separately.
References
- 如何使用 rel="canonical" 和其他方法指定標準網址 | Google 搜尋中心 | Documentation | Google for Developersdevelopers.google.com — Discusses: Will duplicate content definitely incur a ranking penalty if no canonical is set?; If the directory containing the canonical target is blocked by robots.txt, will the short URL also be blocked?
- SEO排名因素有哪些? 47個要點一次看完!www.da-vinci.com.tw · 2022-11-26T16:07:04+08:00 — Discusses: Will duplicate content definitely incur a ranking penalty if no canonical is set?
- The Ultimate List of SEO Myths: 21 Misconceptions Debunkedneilpatel.com · 2025-03-24T14:00:00+00:00 — Discusses: Will duplicate content definitely incur a ranking penalty if no canonical is set?
- Blocking URLs and canonical questionswebmasters.stackexchange.com — Discusses: If the directory containing the canonical target is blocked by robots.txt, will the short URL also be blocked?
- How to use rel='canonical' properlywebmasters.stackexchange.com — Discusses: If category and product pages share some content, should they point to the same canonical URL?
- How to Perform a Complete SEO Audit in 20 Stepswww.semrush.com · 2020-06-01T11:00:00Z — Discusses: If Search Console reports an alternate page or a missing canonical URL, do I need to make changes immediately?
- Duplicate content, point to original?webmasters.stackexchange.com — Discusses: If category and product pages share some content, should they point to the same canonical URL?
- How to use rel='canonical' properlywebmasters.stackexchange.com — Source used in the article above.
- How to use rel='canonical' properlywebmasters.stackexchange.com — Source used in the article above.

