canonical-tags/SKILL.md
Facts to use
- Signals that help Google pick a canonical, strongest first: redirects,
rel="canonical"link, then sitemap inclusion. - Use absolute URLs in
<link rel="canonical" href="...">, in the<head>, one per page. - Do not use robots.txt or the URL removal tool for canonicalization.
- Do not point a canonical to a URL that is noindex, redirects, or returns an error.
- "Alternate page with proper canonical tag" in Search Console is normal when the canonical points to the main URL.
Workflow
- List URL variants: http and https, www and apex, trailing slash, uppercase, query parameters, print views, pagination.
- Choose one preferred form for the site. Redirect other host and protocol forms with 301.
- On each page, add a self-referencing canonical to the preferred URL.
- For true duplicates (same content on two paths), point the canonical of the copy to the main page, or redirect.
- Make the sitemap list only canonical URLs. Make internal links use canonical URLs.
- For single-page apps, put the canonical in the raw HTML, not only after JavaScript runs.
Checks
- Each indexable page has exactly one canonical, absolute, returning 200.
- Canonical, sitemap and internal links agree.
- URL Inspection shows "Google-selected canonical" equal to "User-declared canonical".
Output
A table: URL, current canonical, new canonical, other fixes (redirect, sitemap, link).
Sources
- Google: How to specify a canonical URL with rel="canonical" and other methods. https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls