Canonical Tag Builder: Fix Duplicate URLs
Build a rel=canonical tag, see every URL variant that reaches the same page, and catch http, www, trailing-slash and tracking-parameter conflicts.
A canonical tag builder produces a rel="canonical" link tag and lists the URL variants that compete with it: http and https, with and without www, with and without a trailing slash, and with or without a query string. The tag itself is one line. The work is deciding which URL should win and making sure every other form behaves.
Search engines treat https://example.com/page, https://www.example.com/page, https://example.com/page/ and https://example.com/page?utm_source=x as different addresses. If they all serve the same content, a canonical tag names the preferred one so signals concentrate instead of splitting. It is a hint, not a redirect: visitors still reach every variant.
What the builder outputs
- The canonical tag — a
<link rel="canonical" href="...">element for the page<head>. - The normalised URL — the exact target after your scheme, host, slash and query choices.
- Every variant — each reachable form, marked to show which one is canonical.
- Warnings — fragments, an http target, a subdomain, a double slash in the path, a root URL, and tracking parameters.
- Removable parameters — campaign and click identifiers such as
utm_*,gclid,fbclidandmc_cid.
The builder accepts a full URL, a URL without a scheme, or a bare host. A missing scheme is assumed to be http, so set the scheme explicitly when you mean https. A URL with a space is rejected; encode it as %20.
How to build a canonical tag
- Open the canonical tag builder.
- Paste the URL you want indexed. Include the path, not just the domain.
- Choose the scheme. Force https unless the site genuinely runs on http.
- Choose the host form: keep, add
www, or remove it. - Choose the trailing-slash policy. Keep is safest when you are unsure; consistency matters more than the choice itself.
- Decide whether to keep or strip the query string. Strip when the parameters are tracking only.
- Press Run. Copy the tag into the page
<head>, and confirm the target URL returns 200.
The variant list is the useful part. It shows what a crawler can actually reach, including forms you may not have linked yourself.
Choosing the canonical URL
| Decision | Options | What to pick |
|---|---|---|
| Scheme | Keep, https, http | https, if the site redirects there |
| Host | Keep, add www, remove www | Whichever form the site actually serves |
| Trailing slash | Keep, add, remove | One form, applied everywhere |
| Query string | Keep, strip | Strip when it carries only campaign parameters |
| Fragment | Dropped with a warning | Never include; fragments are not sent to the server |
A canonical URL should be the version that returns 200, is indexable, appears in your sitemap and is used in internal links. If those four disagree, fix them before adding the tag. A canonical pointing at a redirect is ignored, which means the duplicates stay unresolved.
A note on www. The builder only applies the www choice to an apex domain such as example.com. A subdomain like app.example.com has no meaningful www form, so the choice is skipped with a warning. A host with an explicit port is treated as a fixed host name for the same reason.
Common problems and fixes
The tag points at an http URL. That contradicts an https redirect. Set the scheme to https, make sure the http version redirects, and update internal links to the https form.
The tag includes ?utm_source=.... Campaign parameters identify a click, not a page. Strip them from the canonical URL. The builder flags tracking names, but it never removes a query silently: stripping is your decision.
The URL had a #fragment. Fragments are not sent to the server, so a canonical containing one is truncated to the part before it. Drop the fragment and point at the page, not a section.
The canonical target is a different domain. This happens when a staging URL is left in a template. Check the host first, not just the path.
The tag points at a noindex page or a 404. The directive will be ignored or produce confusing results. Verify the target with the meta tag analyzer, and point the tag at a live, indexable URL.
Several pages canonicalise to one, but the content differs. That is the wrong use of a canonical. A canonical tag groups duplicates, not related pages. If the pages differ meaningfully, each needs its own canonical.
The path contains a double slash. /blog//post and /blog/post are separate URLs unless the server normalises them. Fix the link rather than relying on a canonical to paper over it.
The tag is in the body, not the head. Move it into <head>. A canonical outside the head may be ignored.
The sitemap lists a different variant. Align the sitemap with the canonical. Listing /page/ while canonicalising to /page sends mixed signals. The XML sitemap generator lets you force one protocol and remove trailing slashes.
Canonical tag or redirect?
Use a 301 redirect when one URL should never be served: an old path, a retired domain, or http to https. Use a canonical tag when both URLs must keep working, for example when tracking parameters are in use or when a CMS exposes the same content through several routes.
A redirect is stronger: it moves visitors and crawlers. A canonical is a hint that leaves the duplicate reachable. If you can redirect, redirect. If you cannot, canonicalise — and make sure the duplicate pages are not also linked heavily or listed in the sitemap.
Do not combine a canonical with a noindex on the same page. The signals conflict: noindex says do not index this page, while the canonical says index that other one. Pick one intention.
Keeping URLs consistent
Duplicate URLs usually start as small inconsistencies:
- Homepage links to
/about, footer links to/about/. - Newsletter links add
utm_source, the site navigation does not. - An old http link survives in a PDF or an email.
- A CMS generates both
/postand/post?preview=1.
The fix is policy, not just a tag: choose one form of the URL, link to it everywhere, redirect the rest where possible, and use a canonical as a backstop. The slug generator helps keep new paths clean: lowercase, hyphen-separated, no punctuation and no dates that will age badly.
Frequently asked questions
Is the canonical tag builder free?
Yes. It is free and requires no account.
Does a canonical tag redirect visitors?
No. It is a hint to search engines about which URL to index. Visitors can still open every variant. Use a 301 redirect if you want the other URLs to stop serving content.
Should the canonical URL include a trailing slash?
Either form works if you are consistent. Choose one, use it in internal links, the sitemap and the canonical tag. The builder can add or remove the slash so the tag matches your policy.
Should the canonical URL include a query string?
Only when the parameter identifies the page itself. Campaign parameters such as utm_source and click identifiers such as gclid should be stripped. A stripped canonical still points at the same content.
Can a canonical tag point to another domain?
Yes. It is used for syndicated content and for consolidating duplicate domains. Be careful: you are asking search engines to credit the other domain, so it should be a deliberate decision.
What happens if I add a canonical and a noindex tag?
The instructions conflict. noindex asks search engines to drop the page; the canonical asks them to index a different URL. Choose one approach per page.
Does the tool fetch my URL?
No. It parses the URL you enter and builds the tag and variant list. It does not request the page, so it cannot confirm the target returns 200 or is indexable. Check that separately.
Bottom line
A canonical tag is only as good as the URL it names. Decide on one scheme, one host form, one trailing-slash policy and one query policy, then apply them across links, sitemap and tags. Start with the canonical tag builder, verify the target page with the meta tag analyzer, and keep the sitemap aligned with the XML sitemap generator.
Related posts
View allKeyword Density Checker: What the Numbers Mean
Check keyword and phrase density in any text, see over-use warnings, and tune stop words and phrase length. Runs in your browser, nothing uploaded.
Turn Pasted Text into Markdown Tables and FAQ Schema
Paste tab-separated rows or Q:/A: pairs and get a clean Markdown table plus valid FAQPage JSON-LD. Escapes pipes, pads cells and explains limits.
Meta Tag Analyzer: Check a Page Before You Publish
Paste page source and check title, meta description, canonical, robots, viewport, H1 count and Open Graph tags at once. Runs in your browser.
Comments (0)
Be the first to share feedback on this post.