Canonical Tag Generator
Generate structurally precise, absolute HTML link elements to consolidate your website configuration properties, resolve content tracking variance, and secure index mapping priorities.
No configuration paths evaluated yet. Input target address data strings above to initialize compilation elements.
Free Canonical Tag Generator Tool
Duplicate content is one of the most common reasons good websites fail to rank. When the same page can be reached through multiple URLs, such as with and without “www”, with tracking parameters, or through filtered product pages, Google has to guess which version to show. It may pick the wrong one, or split your ranking signals across all of them. A canonical tag solves this by telling search engines exactly which URL is the main version of a page. Our free Canonical URL Generator lets you create a correct, ready-to-use canonical tag in seconds, for a single page or up to 50 pages at once.
What Is a Canonical Tag?
A canonical tag is a single line of code in the head section of a page. It tells search engines which URL is the main version of that content:
<link rel="canonical" href="https://www.example.com/preferred-page/" />
When Google finds several URLs with the same or very similar content, it uses the canonical tag as a strong hint to decide which one to show in search results. Links and ranking signals from the duplicate URLs are then grouped under that main version.
How to Use the Canonical URL Generator
- Choose Single URL to create one tag, or Bulk URLs to create up to 50 at once.
- Enter the full preferred URL of your page, including https:// and the correct www or non-www version.
- Click Generate Canonical Tag.
- Copy the code.
- Paste it into the head section of the page, or add the URL in your SEO plugin’s canonical field.
When Should You Use a Canonical Tag?
- On every page you want to rank: Add a self-referencing canonical that points to the page’s own URL. It protects the page from duplicates created by tracking codes or URL variations.
- URLs with tracking parameters: Links like
?utm_source=facebookcreate new URLs with the same content. A canonical points them all back to the clean URL. - Product variants and filters: Color, size and sort options often create near-identical pages. Point them to the main product or category page.
- www vs non-www and HTTP vs HTTPS: Make sure every version points to your one preferred domain format. A 301 redirect is the stronger fix here, and the canonical acts as a backup.
- Print-friendly or AMP versions: Point alternate versions of a page back to the main version.
Where to Add the Canonical Tag on Your Website
- WordPress (Yoast or Rank Math): Both plugins add a self-referencing canonical to every page automatically. To set a custom one, open the page editor, go to the plugin’s Advanced settings, and paste the URL into the Canonical URL field.
- Shopify: Most themes add canonical tags automatically through theme.liquid. Check that your theme includes them, and don’t add a second one by hand.
- Wix and Squarespace: Both add canonical tags automatically. Wix also lets you set a custom canonical in each page’s SEO settings.
- Custom HTML websites: Paste the generated tag inside the
<head>section of each page, before the closing</head>tag. - PDFs and non-HTML files: Use an HTTP header instead, for example:
Link: <https://www.example.com/file.pdf>; rel="canonical".
Canonical Tag Best Practices
Do:
- Use the full absolute URL, including https:// and your preferred www or non-www version.
- Use only one canonical tag per page.
- Point to a live page that returns a 200 status code.
- Keep canonical URLs consistent with the URLs in your internal links and XML sitemap. Check your sitemap with our Sitemap Checker.
- Give each language version its own self-referencing canonical, and link the versions with our Hreflang Generator.
Don’t:
- Use relative URLs like
/page/. - Point a canonical to a page that is redirected, noindexed or blocked in robots.txt. Confirm it isn’t blocked with our Robots.txt Checker.
- Point every page on your site to the homepage.
- Point paginated pages (page 2, page 3) back to page 1. Each one should point to itself.
- Add a canonical by hand if your theme or SEO plugin already adds one. Two canonical tags on one page cancel each other out.
Check Your Canonical Tags After Adding Them
Adding a canonical tag takes seconds, but a small mistake, like a typo, a second tag from your theme, or the wrong www version, can make Google ignore it. After adding your tags, run your pages through our Canonical Tag Checker to confirm each one is set up correctly. You can also use the URL Inspection tool in Google Search Console to see which canonical Google has chosen.
More Free SEO Tools
- Write optimized titles and descriptions with the Meta Tag Generator.
- Check your page structure with the Heading Tag Checker.
- Explore our complete collection of free SEO tools.
Need Help Fixing Duplicate Content?
This tool is built by Jagdish Prajapat, a well-known SEO expert in India with 12+ years of experience and 1400+ clients worldwide. He has seen how small technical mistakes, like a missing or incorrect canonical tag, quietly hold back rankings, which is why this tool is designed to be simple, accurate and free for everyone. If you’re unsure which URLs should be canonical across your site, or you suspect duplicate content is hurting your traffic, a professional technical SEO audit can find and fix these issues, so your website ranks higher and brings in more customers. Book a free consultation →