Home › SEO Tools › Canonical Tag Generator

Canonical Tag Generator

Clean any URL into a canonical tag, find duplicate addresses in a list, and check a page for canonical mistakes.

Mode

Clean the URL

Output

    How to use the canonical tag generator

    Paste the page URL and the tool cleans it into a canonical URL. The tag updates as you change the options.

    1. Enter the address of the page that will carry the tag.
    2. Leave the canonical box empty to point the page to its cleaned self. Or enter another URL.
    3. Choose how to clean it: https, www, trailing slash and tracking parameters.
    4. Pick the output: an HTML tag, an HTTP header or a sitemap entry.
    5. Copy the code into the head of the page.

    Have a list of messy URLs? Switch to Many URLs. The tool groups every address that leads to the same page, so you can see your duplicates at a glance.

    What is a canonical tag?

    A canonical tag is a line in the head of a page that names its preferred URL. It looks like <link rel="canonical" href="https://example.com/shoes/">.

    One page often has many addresses. Tracking codes, filters, capital letters and a missing slash all create new URLs for the same content. The canonical tells search engines which one to index and show.

    When you need one

    • Links from ads or emails add parameters such as ?utm_source=.
    • Filters and sorting create addresses like ?sort=price.
    • Your site answers on both http and https, or with and without www.
    • A product sits in two categories, with two paths.
    • You republish an article on another site and want the original credited.

    Most SEO advice is to add a self-referencing canonical to every indexable page. It costs nothing and removes doubt.

    How Google treats canonicals

    Google calls rel=canonical a strong signal, not a command. It weighs the tag against redirects, sitemaps and internal links.

    MethodStrengthUse it for
    301 redirectStrongOld URLs you no longer need
    rel=canonical tag or headerStrongDuplicates that must stay live
    Sitemap listingWeakBacking up the other signals

    Send the same message everywhere. Link to the canonical URL, list only canonical URLs in your sitemap, and redirect what you can.

    Common canonical mistakes

    • Relative URLs: use the full address with https://, not /shoes/.
    • Two canonical tags: themes and plugins sometimes add a second one. Google may then ignore both.
    • Tags in the body: Google only reads canonicals in the head.
    • Mixed signals: noindex plus a canonical, or a canonical to a redirected page.
    • Pointing every page to the home page: canonicals are for near duplicates, not for unrelated pages.
    • Using robots.txt: blocking a duplicate stops Google seeing its canonical tag.

    The Check a page mode finds most of these. Paste the page source and it lists every canonical tag, where it sits and where it points.

    Canonicals for PDFs and other files

    A PDF has no head, so it cannot carry a tag. Send the canonical as an HTTP Link header instead.

    Choose HTTP header in the tool. It writes the header plus ready-made rules for Apache and Nginx.

    Why this canonical URL generator is different

    Most canonical tag generator tools wrap your URL in a tag and stop there. This one cleans the URL, checks the result and handles whole lists.

    • Cleans https, www, slashes, case, index files and tracking codes.
    • Bulk mode that groups duplicate URLs and exports a CSV.
    • HTML tag, HTTP header and sitemap outputs.
    • A page checker for missing, duplicate and misplaced tags.

    Use it to generate canonical tag code, or to generate canonical URL lists for a whole site. It is a canonical URL generator first, and a canonical tag generate tool second.

    When old URLs should go for good, redirect them with the Htaccess Redirect Generator. For international pages, add the Hreflang Tag Generator.

    Private by design

    The canonical tag generator runs in your browser. Nothing you type or paste is sent to a server, and there is no sign-up.

    Your last settings are saved on this device only. The tool is ready when you come back.

    Frequently asked questions

    What does a canonical tag do?

    It tells search engines which URL is the main version of a page. Duplicates then pass their signals to that URL.

    Should every page have a canonical tag?

    Every indexable page benefits from one that points to itself. It guards against tracking codes and other duplicates.

    Where does the canonical tag go?

    Inside the head of the page. Google ignores canonical tags in the body.

    Can I use a relative URL?

    It works, but it is easy to break. Use the full address with https://.

    Does Google always follow the canonical?

    No. It is a strong signal, not a rule. Google may pick another URL if your signals disagree.

    How do I set a canonical for a PDF?

    Send it as an HTTP Link header. Choose HTTP header in the tool for the code.

    Canonical or 301 redirect?

    Redirect when the old URL is no longer needed. Use a canonical when both URLs must stay live.

    Is this canonical URL generator free?

    Yes. There is no sign-up and no limit. It runs in your browser.

    Last reviewed 2026-11-30 · How we build and check our tools