Canonical Tag Generator
When the same content is reachable at multiple URLs (query parameters, trailing slashes, HTTP vs HTTPS, paginated archives), Google needs one URL marked as the canonical version. Paste the preferred URL and the generator returns a correctly formatted <link rel="canonical"> tag ready to drop in <head>, plus the HTTP Link header equivalent for non-HTML resources like PDFs.
How to generate a canonical tag
-
1
Paste the canonical (preferred) URL
Absolute URL including protocol and host. Fragment identifiers (#section) are ignored — Google treats URLs with different fragments as identical.
-
2
Tool validates and normalises
Trailing slash consistency, lowercased host, punycode for IDN domains. Missing protocol is flagged as a fix.
-
3
Tag is built
`<link rel="canonical" href="https://example.com/page">`.
-
4
Copy HTML or HTTP header form
Use HTML tag for web pages; use HTTP `Link: <url>; rel="canonical"` for PDFs, images and API responses.
What canonical tags actually do
A canonical tag tells search engines: “of the set of URLs that show this content, this one is the original. Consolidate all ranking signals here.” Without it, duplicate pages split ranking signals — none of them ranks as well as one consolidated page would.
The HTML form
<link rel="canonical" href="https://example.com/products/blue-shirt" />
Place in <head>. Google reads it; browsers ignore it.
The HTTP Link header form
Use for non-HTML resources (PDFs, images, feed XML):
Link: <https://example.com/whitepaper.pdf>; rel="canonical"
Send on any 2xx response. Configure via your web server or CDN.
Common mistakes
- Relative URLs:
href="/page"works but is fragile. Use absolute URLs to avoid ambiguity. - Protocol mismatch: canonical says
http://but the page is served overhttps://. Always match the live protocol. - Pointing to a redirect: canonical must target a 200 response. Chains weaken the signal.
- Blocking the canonical URL in
robots.txt: the target must be crawlable, otherwise Google can’t verify. - Conflicting signals: internal links that point to non-canonical variants. Update them to match.
- noindex on the canonical target: mutually exclusive — pick one.
- Different canonicals on duplicate pages: Google picks one and ignores the others. Set the same canonical on every duplicate.
Special cases
- Paginated archives: each page (
?page=2) can self-canonicalise, not canonicalise to page 1. That used to be different advice; Google explicitly deprecatedrel=prev/nextand now treats self-canonical as standard. - Faceted navigation: filtered views of the same list usually canonicalise back to the unfiltered list unless the filter meaningfully changes content.
- Mobile separate URLs (m.example.com): mobile page canonicalises to desktop; desktop adds
rel=alternatepointing back. - AMP pages: AMP canonicalises to non-AMP; non-AMP adds
rel=amphtmlto the AMP version.
Frequently Asked Questions
Recommended — self-referencing canonicals (page points to itself) protect against session-ID parameters, UTM codes and other accidental duplication. It’s an SEO best practice, not a requirement.
Yes. If syndicated partners republish your content, they can set their canonical to your original URL. Google respects cross-domain canonicals when the content truly matches.
HTTPS, always, for any page served over HTTPS. Mixing protocols sends conflicting signals and can cause Google to pick a random variant.
Canonical should target the final URL after redirects, not an intermediate. Chains weaken the signal — Google may treat a pointer to a 302 as a hint rather than authoritative.
Related Tools
Word Frequency Counter
Find the most repeated words in any text with counts and density percentages. Useful for editing, SEO checks and content audits.
Backlink Anchor Text Analyzer
Paste backlinks, CSV rows, URL | anchor pairs or plain anchor lines to count repeated anchor text and export Anchor Text,Count,Share CSV.
Broken Link Checker
Crawl a single page (or a small sitemap) and flag every broken link by HTTP status. Fast check with redirect chain detection.
Breadcrumb Schema Generator
Generate valid BreadcrumbList JSON-LD for any page hierarchy. Produces schema.org markup ready to paste into your site head.
Canonical URL Checker
Check the canonical URL Google sees for any page. Detects HTML link tag, HTTP Link header, conflicts and redirect chains.
BMI Calculator
Calculate body mass index from height and weight. Shows WHO category, healthy-weight range and limitations of BMI.