Canonical URL Builder

Build canonical link tags to prevent duplicate content issues

About This Tool

You've got the same product page accessible at three URLs (with and without trailing slash, with tracking parameters), and Google is splitting the ranking signal across all of them. The canonical link tag fixes this — you tell Google which version to count, and the rest get folded in. The builder writes the tag.

Drop in your preferred URL, optionally add the alternate-language hreflang variants, and get back the `<link rel='canonical'>` tag (and matching hreflang block if needed). Paste into your `<head>` or set it via your CMS.

Mistakes are easy: pointing the canonical at the wrong page, leaving relative URLs that confuse crawlers, forgetting that canonical is a hint not a directive. The tool emits absolute URLs by default for that reason.

The canonical link element tells search engines which URL is the primary version of a page when multiple URLs serve the same or near-identical content. The syntax is a single line in your page's `<head>`: `<link rel='canonical' href='https://example.com/canonical-url' />`. The href must be an absolute URL — relative paths confuse crawlers. The tag is a strong hint, not a directive; Google considers it alongside other signals like internal linking, sitemap inclusion, and the actual content of the page when picking which URL to index.

A worked example: you have a product page accessible via multiple URLs: `https://shop.example.com/products/blue-widget` (canonical), `https://shop.example.com/products/blue-widget?ref=email` (with tracking), `https://shop.example.com/products/blue-widget/` (with trailing slash), `https://shop.example.com/category/widgets/blue-widget` (alternate path). All four show the same product. Without canonical tags, Google might split ranking signal across them or pick an unintended one as the primary. With `<link rel='canonical' href='https://shop.example.com/products/blue-widget' />` on every variant, you tell Google to attribute all the link equity and ranking to the canonical URL.

For multi-language sites, canonical works alongside hreflang. Each language version has its own self-canonical (`/en/page` canonicals to itself, `/de/page` canonicals to itself). The hreflang annotations cross-reference: the English page declares the German page as an alternate language version, and vice versa. Canonical is about deduplication; hreflang is about language signaling. Both can coexist and frequently do on internationalized sites.

Common mistakes: pointing canonical at a different page entirely (a category page canonicaling to the homepage drops the category page from indexing), forgetting the absolute URL (relative paths fail silently), inconsistent canonicals across variants (one variant canonicalizes to A, another to B, which confuses crawlers), and conflicting signals (a page with self-canonical that also has `noindex` is contradictory and Google will guess which to honor). The builder produces consistent absolute URLs to avoid the most frequent of these errors, but you still need to apply the tag correctly across every variant of the page.

The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.

Frequently Asked Questions