SEO Tools

Canonical URL Tag Generator

Create a canonical link element for a URL you have confirmed as the preferred version.

Fill in the fields below. The tool processes your input in this browser and explains what its result can and cannot tell you.

Preparing the tool…

How this tool works

Validates the URL format in the browser and escapes it inside a canonical link element.

How to use it

  1. Identify the preferred URL for the duplicate or alternate page.
  2. Enter its absolute HTTPS URL.
  3. Add the element to the page head and check the live canonical signals.

Limits to keep in mind

A canonical is a signal, not a command. This tool cannot inspect redirects, page content, or Google-selected canonicals.

Frequently asked questions

Does a canonical force Google to select that URL?

No. It expresses a preference; Google may select another canonical based on its signals.

Should every page canonicalize to the homepage?

No. Point to the preferred equivalent page, not an unrelated page.

Should a page have a canonical pointing to itself?

Yes, a self-referencing canonical on the preferred URL is common practice and helps when the same page can be reached with tracking parameters or other variants.

Should I use a relative or an absolute canonical URL?

Use the absolute URL, including https and the exact host you prefer. Relative values are easier to get wrong when a site is reachable on more than one host.

What a canonical link tells search engines

A canonical link is a small piece of HTML placed in the head of a page. It names the URL you consider the preferred, representative version when the same or very similar content can be reached through more than one address. Common examples are a page reachable with and without tracking parameters, a product shown in several categories, or content available on both http and https.

The Canonical URL Tag Generator takes the preferred URL you enter, checks in your browser that it looks like a valid address, and produces a link element with rel set to canonical. It escapes special characters so the element stays valid HTML. The tool works only with the text you give it. It does not visit your pages, check redirects, or find duplicate content on your site.

It is a signal, not a command

Search engines treat a canonical tag as a strong hint, not an order. Google compares your declared canonical with other signals, such as redirects, internal links, sitemap entries, HTTPS, and the content itself, before it chooses the canonical URL it will show. If your signals disagree, it can pick a different URL than the one you declared.

This is why a canonical tag should confirm what the rest of your site already says. If your internal links point to one version, your sitemap lists another, and your canonical names a third, you leave the decision to the search engine. Make the preferred version the one you link to, list in the sitemap, redirect to where possible, and name in the canonical tag.

Choose the preferred URL carefully

The canonical target should be a page that returns a successful response, can be indexed, and holds the full useful content. Do not point it to a redirect, an error page, a page marked noindex, or a page that is blocked from crawling. Use the absolute address, including https and the exact host you prefer, rather than a relative path.

For most pages, the right move is a self-referencing canonical, which names the page's own clean URL. This protects against accidental duplicates created by parameters, session identifiers or capitalization changes. For true duplicates, such as a printer-friendly version or a syndicated copy, point the duplicate to the original. When you can, use a 301 redirect instead, because a redirect removes the duplicate for users as well.

Where to place the tag and what to avoid

Place a single canonical element inside the head section of the page. A tag placed in the body is ignored, and multiple conflicting canonical tags can cause all of them to be disregarded. If your CMS or an SEO plugin already outputs a canonical tag, do not add a second one. Check the rendered source of the live page to see exactly what is present.

Avoid canonical chains, where page A names page B and page B names page C. Avoid pointing every page of a site to the homepage, which tells search engines that all your content is a duplicate of one page. Do not use a canonical to merge pages that are genuinely different, and do not combine it with a noindex tag on the same page in a way that sends mixed messages. For non-HTML files such as PDFs, a canonical can be sent in an HTTP header instead.

Special cases: pagination, parameters and languages

Paginated lists are a frequent source of confusion. Each page in a series, such as page two of a category, normally has its own self-referencing canonical, not one that points to page one, because the items on each page are different. Pointing every page to the first page can stop later products or articles from being discovered.

For filtered or sorted listings that create many parameter URLs, decide which versions deserve to be found. Often the clean category URL is the canonical, and filtered versions point to it. For multilingual sites, each language version should canonicalize to itself and use hreflang annotations to link to the other languages. Pointing a translated page to the original language page removes the translation from consideration.

How to use the generator

Identify the version of the page you want to appear in search. Open it in your browser and copy the address from the bar, taking care that it is the clean version without tracking parameters or session codes. Paste it into the tool as an absolute HTTPS URL. If the tool reports a problem, fix the address and try again.

Copy the generated link element and add it to the head of every page that shares this content, including the preferred page itself. In a CMS, look for a canonical field rather than editing templates by hand. After publishing, view the page source and search for rel canonical to confirm there is exactly one tag with the right address. Then use the URL Inspection tool in Google Search Console and compare your declared canonical with the one Google selected.

Limits to keep in mind

The generator cannot tell you whether your chosen URL is a good canonical. It does not check whether the page responds correctly, whether it redirects, whether it is blocked, or which URL Google has already selected. It cannot find duplicates for you or merge pages automatically.

Treat the output as a formatted tag, and treat the decision behind it as your own. If Search Console reports that Google chose a different canonical than you declared, investigate the page content, your internal links, your redirects and your sitemap rather than only repeating the tag. Consistent signals across all of these produce reliable canonical results.

More SEO Tools · Browse the tools catalogue