Skip to main content
VClick Tools
SEO TOOLS100% Client-Side

Free Canonical Tag Generator

Generate a copy-ready rel="canonical" tag from any URL — with optional normalization for HTTPS, fragments, tracking parameters, www, and trailing slashes.

100% Browser-BasedNo Signup RequiredInstant Output

Canonical Tag Generator

Browser-only · No data is uploaded

Normalization Options
Changes Applied
  • ✓ Removed URL fragment
https://example.com/blog/seo-guide?utm_source=newsletter
<link rel="canonical" href="https://example.com/blog/seo-guide?utm_source=newsletter" />

Paste inside the <head> section of your HTML document.

Link: <https://example.com/blog/seo-guide?utm_source=newsletter>; rel="canonical"

Set this as an HTTP response header instead of the HTML tag. Either method works — you do not need both.

STEP-BY-STEP GUIDE

How to Use the Canonical Tag Generator

Follow these steps to generate a canonical link tag for your page:

1

Step 1 — Enter your URL

Paste the absolute URL of the page you want to set as the canonical (preferred) version. The URL must begin with http:// or https://.

2

Step 2 — Choose normalization options

Select which transformations to apply: force HTTPS, remove the URL fragment, remove tracking parameters, remove all query parameters, set a WWW preference, or control the trailing slash.

3

Step 3 — Review the change summary

The tool shows you exactly which transformations were applied, so there are no surprises in the output.

4

Step 4 — Copy the HTML tag

Click COPY TAG to copy the <link rel="canonical" href="..." /> element to your clipboard.

5

Step 5 — Place the tag in your <head>

Paste the copied tag inside the <head> section of your HTML page. For server-side implementations, use the HTTP Link header output instead.

Fundamentals

What Is a Canonical Tag?

A canonical tag is an HTML element that specifies the preferred URL for a page when search engines find the same or substantially similar content accessible through multiple URLs.
The syntax is: <link rel="canonical" href="https://example.com/preferred-page" />
The tag belongs inside the <head> section of your HTML document, and the href attribute should always contain an absolute URL — including protocol, domain, and path.
How It Works

What Does rel="canonical" Do?

When you publish a canonical tag, you are sending a signal to search engines that says: this URL is my preferred version — please consolidate ranking signals here.
Without this signal, search engines may encounter your content at multiple addresses — with and without www, with and without trailing slashes, with varying query parameters — and split link equity across those variants. A canonical tag helps unify that signal.
It is important to understand that canonical tags are hints, not directives. Search engines can and do override canonical declarations when other signals (such as sitemaps, internal links, or HTTP redirects) strongly suggest a different preferred URL.
Implementation

Where to Put a Canonical Tag

The canonical tag must be placed in the <head> section of your HTML document — before the closing </head> tag.
Canonical tags found in the <body> are invalid and will be ignored. If you are using a CMS like WordPress, most SEO plugins (such as Yoast SEO or Rank Math) inject the canonical tag automatically.
For non-HTML content types — such as PDFs or content served via API — you can signal a canonical URL using the HTTP Link response header instead of an HTML tag. The format is: Link: <https://example.com/page>; rel="canonical"
Best Practices

What Makes a Good Canonical URL?

A good canonical URL is the single, clean, permanent address you want search engines and users to use when referencing your page.
Use HTTPS. Serve content over a secure protocol and set your canonical accordingly.
Use a consistent www or non-www format across your entire site and always match it in canonical tags.
Decide on a trailing slash convention and stick to it. If your site uses /blog/article, do not mix in /blog/article/ across different canonical tags.
Exclude tracking parameters (such as utm_source, gclid, fbclid) from canonical URLs. These parameters do not change page content and should not appear in the preferred URL you want indexed.
URL Format

Absolute vs Relative Canonical URLs

An absolute URL includes the full address: protocol, domain, and path — for example, https://example.com/blog/article.
A relative canonical URL contains only the path portion — for example, /blog/article.
While some search engines can interpret relative canonical URLs, absolute URLs are strongly recommended. Relative URLs introduce ambiguity when content is mirrored across subdomains or accessed via unusual paths. Always use absolute URLs in canonical tags.
Self-Referencing

Self-Referencing Canonical Tags

A self-referencing canonical tag is one where a page's canonical URL points to itself — the page and the canonical are the same URL.
Adding self-referencing canonicals to every page is an SEO best practice, even when you have no obvious duplicate content. It prevents search engines from selecting a different canonical based on incidental URL variations introduced by session IDs, marketing parameters, or pagination.
WordPress, Next.js with next/head, and most modern frameworks make it straightforward to generate self-referencing canonicals programmatically.
Duplicate Content

Canonical Tags and Duplicate URLs

Duplicate content arises when the same or substantially similar page content is accessible through more than one URL. Common causes include HTTP and HTTPS versions, www and non-www versions, URL parameters, paginated pages, and printer-friendly page variants.
Without canonicalization, search engines must independently decide which version to index. Their choice may not match your preference. In some cases, ranking signals are fragmented across several versions, weakening any individual URL.
A canonical tag allows you to explicitly declare the preferred version and consolidate these signals. It is one of the primary tools in technical SEO for managing URL equity.
Query Parameters

Query Parameters and Canonical URLs

Not all query parameters should be excluded from canonical URLs. Parameters that meaningfully filter or change page content — such as product filters, sort order, or pagination — may warrant separate canonical declarations.
Parameters that do not change content — such as UTM tracking codes (utm_source, utm_medium, utm_campaign), ad click IDs (gclid, fbclid), or session tokens — should be excluded from canonical URLs.
This generator gives you separate options: you can remove only known tracking parameters while preserving content-affecting parameters, or you can remove the entire query string if the page content is identical regardless of parameters.
URL Normalization

HTTPS, WWW, and Trailing Slashes

Three common sources of unintentional URL duplication are protocol (HTTP vs. HTTPS), hostname prefix (www vs. non-www), and trailing slashes. All three should be consistently normalized across your entire site.
Use this generator's normalization options to enforce these preferences during tag generation. For production sites, combining canonical tags with 301 redirects and consistent internal linking produces the most reliable results.
Note that modifying these settings here only affects the canonical URL you generate. You must separately configure your web server or CMS to ensure all URL variants redirect to the normalized form.
Common Mistakes

Common Canonical Tag Mistakes

Using a relative URL in the canonical href. Always use absolute URLs.
Placing the canonical tag in the instead of the . Tags in the body are ignored.
Pointing the canonical to a URL that itself redirects. Canonical URLs should resolve directly without redirection.
Setting a different canonical on every paginated page. Pagination should generally use self-referencing canonicals or dedicated pagination markup.
Adding a canonical and a noindex tag on the same page. These are contradictory signals — noindex pages should not be canonicalized to, and canonicalized pages should not be noindexed.
Canonicalizing multiple pages to a URL that does not exist or returns a non-200 HTTP status.
Canonical vs Redirect

Canonical Tags vs 301 Redirects

Both canonical tags and 301 redirects communicate a preferred URL to search engines, but they work differently.
A 301 redirect sends users and bots from one URL to another, physically moving traffic. Canonical tags do not redirect users — they only signal to search engines that a different URL is preferred.
For permanent consolidation of two distinct URLs (such as after a domain migration), a 301 redirect is stronger and more reliable. Canonical tags are better suited for scenarios where you want to serve the same content at multiple URLs for legitimate reasons (such as printer-friendly pages or alternate sort parameters) while still declaring one URL as preferred.
Canonical vs Robots.txt

Canonical Tags vs Robots.txt

Canonical tags and robots.txt serve distinct functions and should not be confused or used interchangeably.
A robots.txt file controls crawler access — it tells search engine bots whether they are allowed to crawl specific paths. Disallowing a URL in robots.txt does not communicate anything about canonical preference; it simply prevents crawling.
A canonical tag, by contrast, allows a page to be crawled and indexed, but signals that ranking credit should be attributed to a different (canonical) URL.
Using robots.txt to block a URL while also having a canonical pointing to it creates a contradiction: Google cannot read the canonical on a page it cannot crawl.
Indexing

Canonical Tags and Search Engine Indexing

Adding a canonical tag does not guarantee that search engines will index the specified URL or remove the non-canonical URL from their index. Indexing decisions involve many signals beyond the canonical tag alone.
If you want a specific URL excluded from indexing, use a noindex meta tag or, for non-crawlable content, robots.txt disallow rules.
The canonical tag's primary function is to influence which URL receives consolidated ranking signals when multiple URLs serve similar content — not to directly control indexing.
Tool Limitations

What This Generator Can and Cannot Check

This generator can: generate a canonical URL by applying your chosen normalization options; produce valid HTML syntax; produce an HTTP Link header alternative; show a summary of which transformations were applied; and copy all outputs to your clipboard.
This generator cannot: crawl a live page or inspect its existing canonical tag; read your server's HTTP response headers; verify that the canonical target exists and returns a 200 status; determine which URL Google has selected as canonical; or predict or guarantee search engine rankings or indexing behavior.
For inspecting an existing page's canonical declaration, use Google Search Console, browser developer tools (Network tab), or a dedicated site auditing tool.
FAQ

Frequently Asked Questions

Common questions about canonical tags and how to use this generator.

Was this tool useful?

Your feedback helps us improve VClick Tools.