
CORS Header Checker & Preflight Simulator
Validate HTTP Access-Control-Allow-* CORS response headers against browser request Origin, Method, Headers, and Credentials mode. Diagnose preflight OPTIONS failures.
Open toolPaste any absolute URL into the Canonical Tag Generator below to strip UTM tracking parameters and URL fragments, normalize trailing slashes, and generate both the HTML <head> tag and HTTP Link header.
Enter the inputs, then select Generate Canonical Tag.
Result will appear here
The Canonical Tag Generator parses your URL using the WHATWG URL standard, verifies an explicit http:// or https:// scheme, strips #hash fragments, filters query parameters per your rule, applies trailing-slash and case normalization, and outputs HTML-escaped markup.
<link rel="canonical" href="https://domain.com/normalized-path">
Also generates the RFC 6596 HTTP response header (Link: <URL>; rel="canonical") for PDFs and non-HTML resources, plus Next.js/React metadata syntax.
Review the input parameters, allowed value ranges, and worked reference cases for the Canonical Tag Generator below before running your calculation.
| Parameter / Scenario | Default / Sample Value | Rule or Allowed Range | Output / Usage Note |
|---|---|---|---|
| Input: Target page URL (absolute http/https) | https://aitoolsfree.net/tools/can... | Enter the full absolute URL starting with https:// or http://. | Required workspace parameter |
| Input: Query parameter cleanup | tracking | Options: Strip tracking params (utm_*, fbclid, gclid, msclkid, _ga), Strip all query parameters (?...), Keep all query parameters intact | Required workspace parameter |
| Input: Trailing slash policy (on non-root paths) | preserve | Options: Preserve input trailing slash, Remove trailing slash (/tools/slug/ -> /tools/slug), Enforce trailing slash (/blog/post -> /blog/post/) | Required workspace parameter |
| Input: Path case normalization | yes | Options: Lowercase hostname & path, Lowercase hostname only (preserve path case) | Required workspace parameter |
| Worked Case 1: Cleaning a newsletter campaign URL with UTM params and #pricing hash | Preloaded / test values | Canonical URL = Origin + NormalizedPath + FilteredQuery (always stripping #fragment per RFC 6596); Tag = <link rel="canonical" href="EscapedURL"> | Inputting 'https://aitoolsfree.net/tools/canonical-tag-generator?utm_source=newsletter&utm_medium=email#pricing' removes 2 UTM parameters and the '#pricing' fragment, outputting <link rel="canonical" href="https://aitoolsfree.net/tools/canonical-tag-generator">. |
| Worked Case 2: Preserving pagination (?page=2) while stripping gclid | Preloaded / test values | Canonical URL = Origin + NormalizedPath + FilteredQuery (always stripping #fragment per RFC 6596); Tag = <link rel="canonical" href="EscapedURL"> | In 'Strip tracking params' mode, 'https://example.com/Catalog/?page=2&gclid=test123' lowercases '/Catalog/' to '/catalog/', strips 'gclid', and keeps '?page=2'. |
Clean up campaign URLs or verify your template's canonical convention before deploying.
Paste your target URL including scheme and domain (relative URLs without http/https are flagged with an error).
Choose whether to strip tracking params (utm_*, gclid, fbclid), strip all query strings, or keep query strings, and set your trailing-slash policy.
Click Generate Canonical Tag to inspect the cleaned URL, removed parameters/fragments, HTML <head> tag, and HTTP Link header.
See how campaign URLs with UTM tags and hash fragments normalize into clean canonical tags.
Inputting 'https://aitoolsfree.net/tools/canonical-tag-generator?utm_source=newsletter&utm_medium=email#pricing' removes 2 UTM parameters and the '#pricing' fragment, outputting <link rel="canonical" href="https://aitoolsfree.net/tools/canonical-tag-generator">.
In 'Strip tracking params' mode, 'https://example.com/Catalog/?page=2&gclid=test123' lowercases '/Catalog/' to '/catalog/', strips 'gclid', and keeps '?page=2'.
Place the generated <link rel="canonical"> tag inside <head> (never inside <body>) and ensure your CMS does not emit a second conflicting canonical tag.
Review the Normalized Canonical URL and the cleanup audit before pasting the tag into your template.
The headline result displays the ready-to-paste HTML <link rel="canonical"> tag. Breakdown cards show the normalized URL, protocol check (HTTPS vs. HTTP), parameters stripped count, fragment removed status, and the HTTP Link header.
Verify that your canonical target returns HTTP 200 and is not blocked by robots.txt or noindex.
Relative paths (like '/tools/slug' without 'https://domain.com') are rejected because canonical tags should always specify the full scheme and hostname. Make sure the canonical URL you output actually resolves with HTTP 200 on your server rather than a 301 redirect or 404.

Validate HTTP Access-Control-Allow-* CORS response headers against browser request Origin, Method, Headers, and Credentials mode. Diagnose preflight OPTIONS failures.
Open tool
Generate official wa.me click-to-chat WhatsApp links and HTML button snippets from an international phone number and pre-filled message.
Open tool
Scan HTML for missing or weak <img> alt attributes, flag filename alt text and redundant prefixes, and generate WCAG 1.1.1 compliant fixes.
Open toolChoose another tool for your next calculation, conversion, or text task.
Parse canonical link elements from HTML and identify resolved URLs, invalid targets and conflicting canonical values.
Open toolExtract href values and link text from pasted HTML and resolve relative links against your supplied base URL.
Open tool
Escape supplied text and write title, description and canonical HTML elements.
Open tool
Generate an SMS URL with encoded message text.
Open toolAnswers about using Canonical Tag Generator and understanding its results.
While HTML allows relative paths in <link> elements, Google Search Central explicitly recommends using full absolute URLs (including https:// and your domain name) in rel="canonical" to prevent misinterpretation when pages are scraped or served across staging domains.
Search engines do not index URL hash fragments (such as #section-2) as separate pages and Google Search Central states that fragments are not supported in rel="canonical". The generator strips #fragments automatically.
Use the HTML <link rel="canonical"> tag inside <head> for standard HTML web pages, and use the HTTP response header (Link: <https://...>; rel="canonical") for non-HTML documents like downloadable PDF files.
It strips utm_source, utm_medium, utm_campaign, utm_term, utm_content, utm_id, gclid, fbclid, msclkid, twclid, mc_cid, mc_eid, and _ga while preserving functional query parameters like ?page=2.
Choose another tool for your next calculation, conversion, or text task.