Canonicalization is how you tell search engines which URL is the "real" one when the same page can be reached at several addresses. Every platform creates those extra addresses in its own way. WordPress makes tag, attachment and paginated archives. Shopify puts the same product under every collection it belongs to. Astro and other static sites trip over trailing slashes and redirect rules. The fix is the same everywhere: one preferred URL per page, a rel="canonical" tag that names it, and redirects and internal links that agree with that tag.
Most guides on page 1 explain the concept well and then stop. This one goes platform by platform, because the duplicates you get depend on what your site is built on. We build on all three, and in 2026 we moved our own site, nurotech.in, from WordPress to Astro, so a lot of what follows comes from fixing these issues on real projects.
Methodology: in November 2026 our team re-read Google's canonicalization documentation, checked the canonical tag and redirect response for 7 URL variants of one page on nurotech.in with curl, read the robots.txt of a Shopify store we look after, and compared the 5 articles that rank on page 1 in Delhi for "canonicalization". Every figure below that comes from our own site is something you can re-run yourself in under a minute.
Picture one product page that can be opened at four addresses: with and without www, with and without a trailing slash. To you it's one page. To a crawler it's four URLs that return the same content. Google has to pick one to show in results, and it has to decide where the links pointing at those four addresses should count.
Canonicalization is that picking process. The "canonical URL" is the version that wins. A canonical tag is a line of HTML in the page's <head> that tells search engines which version you'd like to win:
<link rel="canonical" href="https://example.com/blue-kurta/">
The canonical link relation was formally defined in 2012 in RFC 6596, published by the IETF. Google, Bing and Yandex had announced support for it 3 years earlier, in February 2009. So this isn't a new trick. What changes is how each platform generates the duplicates the tag is meant to clean up.
Why does it matter for a business site? Three reasons. Links get split across versions, so no single URL collects the full value. Crawl time gets spent on copies instead of new pages. And the version Google shows might be an ugly one with tracking parameters, or an old http:// address. None of these will get a site penalised. Duplicate content is not a penalty in itself, according to Google. It just wastes signals you've worked to earn.
This is the part most people get wrong. A canonical tag is a hint, not a command. Per the Google Search Central guide on consolidating duplicate URLs, Google weighs several signals together and ranks them roughly by strength:
/page 301s to /page/, the target is very likely to become canonical.sitemap.xml nudges Google toward it, nothing more.Google also considers whether the page is on HTTPS, which version your internal links point to, and hreflang clusters. When those signals disagree, Google makes its own call. The documentation found that conflicting signals are the most common reason a declared canonical gets overridden.
We've seen the same thing on audits. A site declares /services/ as canonical, but the main menu links to /services without the slash, the sitemap lists /services/index.html, and the server returns 200 for all three. That's 3 different answers to one question. Google chooses one, and it's not always yours.
You can see Google's choice in Search Console. The URL Inspection tool shows two fields: "User-declared canonical" and "Google-selected canonical". If they differ, Google ignored your hint. The Page indexing report groups these into statuses such as "Duplicate, Google chose different canonical than user" and "Alternate page with proper canonical tag". The second one is fine; it means Google agreed with you. The first one is the one to chase.
A few rules that Google states plainly and that people still break:
https://.noindex as a canonical tool between pages on the same site. It removes the page instead of consolidating it.WordPress has printed a canonical tag on single posts and pages since version 2.9, released in December 2009, through the core rel_canonical() function. Yoast SEO and Rank Math replace that output with their own. So the tag itself is rarely missing on a WordPress site. The trouble is the sheer number of URLs WordPress creates around each post.
Tag and category archives. Every tag you add creates a new archive page. A blog with 60 posts and loose tagging can end up with 200 tag pages, many listing only 1 or 2 posts with the same excerpts. These aren't strict duplicates of a post, but they compete for the same terms and soak up crawl time. When we audit WordPress blogs, thin tag archives are one of the first things we look for. The usual fix is to set tag archives to noindex in your SEO plugin, or to merge tags so each one has enough posts to be useful.
Attachment pages. Each image you upload used to get its own page, like /blue-kurta/kurta-front-view/, with almost no content. WordPress 6.4, released in November 2023, switched attachment pages off by default for new installs. Older sites keep them on unless you change the setting. Yoast has a "redirect attachment URLs to the attachment itself" option that sends those pages to the image file with a 301.
Pagination. Archives split into /blog/page/2/, /page/3/ and so on. A common mistake is pointing the canonical on page 2 back to page 1. Google advises against that: each paginated page should carry a self-referencing canonical, because page 2 lists different posts than page 1.
Comment and query parameters. ?replytocom=123 links on threaded comments, ?amp leftovers from old AMP plugins, and tracking tags like ?utm_source=whatsapp all create extra addresses for the same post. A correct canonical tag handles most of these, as long as the plugin outputs the clean URL rather than echoing the request.
Author and date archives. On a single-author site, /author/admin/ is a near copy of the main blog index. Date archives such as /2025/03/ are the same story. Most SEO plugins can disable both in 2 clicks.
The double-tag problem. Some premium themes print their own canonical in header.php, and then the SEO plugin prints another. View the page source and search for rel="canonical". If you see it twice, remove one. On sites our team has inherited, this has been one of the most common technical faults, and it takes about 5 minutes to fix.
WooCommerce adds its own layer: products filtered by attribute (?filter_colour=blue), sorted lists (?orderby=price) and product category paths. The same canonical-plus-clean-internal-links approach applies.
Shopify handles canonical tags automatically through the {{ canonical_url }} object in a theme's theme.liquid. That's a real advantage. The catch is that Shopify generates more product URLs than most store owners realise.
Collection-aware product paths. A product with the handle blue-kurta lives at /products/blue-kurta. If it sits in 4 collections, it can also be opened at /collections/kurtas/products/blue-kurta, /collections/new-arrivals/products/blue-kurta, and 2 more. That's 5 URLs for one product. Shopify's canonical on all of them points to /products/blue-kurta, which is correct.
The problem is internal linking. Many themes use the Liquid filter within: collection on product cards, so every link from a collection page goes to the long collection path instead of the canonical one. Google is then told "the canonical is /products/blue-kurta" by the tag and "the important URL is /collections/kurtas/products/blue-kurta" by hundreds of internal links. Removing | within: collection from the product card snippet makes the links and the tag agree. It's a one-line theme edit, but test it on a duplicate theme first.
Variant URLs. Picking a size or colour adds ?variant=4412345678 to the address. The canonical still points to the base product, which is what you want for most stores. If each colour genuinely needs its own search presence (say, a saree sold in 12 distinct prints that people search for by name), that's a case for separate products, not for fighting the canonical.
Sort, filter and tag collections. ?sort_by=price-ascending, filtered collections and tag paths like /collections/kurtas/cotton multiply fast. Shopify's default robots.txt already blocks the worst of these. On a Shopify store we look after, the live robots.txt includes Disallow: /collections/*sort_by*, Disallow: /collections/*+* and Disallow: /collections/*filter*&*filter*. Since June 2021 you can edit this through a robots.txt.liquid template, but the defaults are sensible. Leave them alone unless you know exactly why you're changing them.
Shopify Markets. Selling abroad with subfolders like /en-us/ creates a full copy of the store per market. Here hreflang does the work, and each market version should self-canonicalise. Shopify sets this up automatically. Things go wrong when an app or a hard-coded snippet overrides it. The Shopify Help Centre's SEO section covers the store-side settings.
When we moved nurotech.in from WordPress to Astro in 2026, the duplicate problems didn't disappear. They changed shape. A static site has no tag archives and no attachment pages, but it has a quieter issue: the same file can answer at several paths, and Astro does not write a canonical tag for you.
Trailing slashes. By default Astro builds each page as a folder with an index.html inside (build.format: 'directory'), and its trailingSlash setting defaults to 'ignore'. What visitors actually get depends on the host. We measured our own site on Cloudflare Pages in November 2026:
| URL variant requested | Response | Goes to |
|---|---|---|
https://nurotech.in/seo-company-in-delhi/ | 200 | (canonical itself) |
https://nurotech.in/seo-company-in-delhi | 308 | slash version |
https://nurotech.in/seo-company-in-delhi/index.html | 308 | slash version |
https://www.nurotech.in/seo-company-in-delhi/ | 301 | apex, slash version |
http://nurotech.in/seo-company-in-delhi/ | 301 | https version |
https://nurotech.in/seo-company-in-delhi/?utm_source=x | 200 | canonical tag names the clean URL |
https://nurotech.in/SEO-company-in-delhi/ | 404 | no page |
Six of those seven variants end at one address, either by redirect or through the canonical tag, and the seventh doesn't exist. That's the target state. Getting there took deliberate work, though. Cloudflare Pages adds the slash redirect on its own. The www to apex 301 needed a zone-level rule, because our first attempt in the Pages _redirects file silently did nothing while www was registered as a custom domain on the project. That's the kind of detail no generic guide warns you about.
Other hosts behave differently. Netlify, Vercel and a plain Nginx server each have their own slash rules, and some serve both versions with a 200. If your host does that, either set trailingSlash: 'always' in Astro and add a redirect, or make sure every canonical tag and internal link uses one style.
The canonical tag itself. Astro leaves it to you. A typical layout builds it from Astro.url.pathname and Astro.site:
const canonical = new URL(Astro.url.pathname, Astro.site);
<link rel="canonical" href={canonical.href} />
Two things go wrong here. If site isn't set in astro.config.mjs, the tag comes out relative or missing. And if your links are written without slashes while the host redirects to slash versions, your canonical tags point at redirecting URLs. Google will usually work it out, but you're sending mixed signals for no reason. We set site: 'https://nurotech.in' once, and the same value also drives the @astrojs/sitemap output, so the sitemap, canonical tags and internal links all use one origin.
Redirect files after a migration. Moving off WordPress leaves old URLs behind: /category/seo/, old date-based post paths, image attachment pages. Every one that still gets visits or links needs a 301 to its closest new equivalent, not to the home page. In our migration we mapped 8 legacy WordPress URLs that were still drawing real visits but returning 404, and redirected each to a live page. A redirect is a stronger canonical signal than a tag, so this is where it pays to be thorough.
A canonical tag doesn't have to point to the same domain. If you run two sites and publish the same buying guide on both, the copy on the second site can carry a canonical pointing at the first. Google supports this, and it's a clean way to keep one version in the index while both audiences can still read it.
Syndication to someone else's site is a different case. Plenty of Indian businesses send articles to industry portals, news sites or LinkedIn newsletters, hoping the reach helps. For years the standard advice was to ask the publisher to add a canonical back to your original. In May 2023 Google changed that guidance: it now says the canonical link is not the recommended tool for syndication partners, and that partners who want to keep their copy out of Google should use noindex instead. The reason is practical. The two pages are rarely identical once a publisher adds its own header, related stories and comments, so Google often treats the canonical as a weak hint and may rank the partner's copy above yours.
In our experience the safer pattern is simple. Publish on your own site first, wait until Google has indexed it (usually 2 to 7 days for a site that's crawled regularly), and only then share it elsewhere with a clear link back to the original. If a partner agrees to noindex their copy, even better. If they won't, write a shorter, different version for them rather than handing over the full article.
You don't need a paid tool for a first pass. This routine works on any platform.
canonical. Confirm there's exactly one tag, it uses an absolute https:// URL, and it matches the address you'd want in Google.www, with and without the trailing slash, on http://, and with ?utm_source=test on the end. Every variant should either redirect to your preferred URL or show a canonical tag naming it. On a Mac or Linux terminal, curl -I shows the status code and redirect target in 1 second.If any step turns up a mismatch, fix the signals in this order: redirects first, then internal links, then the canonical tag, then the sitemap. That order follows signal strength.
These three get mixed up constantly, and they do different jobs.
Use a 301 redirect when the duplicate URL has no reason to exist for visitors. Old http:// pages, www versions, retired WordPress paths after a migration. The visitor and the crawler both land on the right page, and link value passes along.
Use a canonical tag when the duplicate must stay reachable for people but shouldn't compete in search. Shopify collection paths, variant URLs, tracking parameters, print versions, and the same article cross-posted on a second site you own. Visitors keep their experience; search engines get your preference.
Use noindex when a page is useful to visitors but has no business in search results at all, and is not a copy of another page. Thin tag archives, internal search results, thank-you pages. Don't combine noindex with a canonical pointing elsewhere; those two signals contradict each other.
Bing follows the same logic. Its Webmaster Guidelines support rel=canonical and treat it as a hint in much the same way.
If you only have an hour, do this: confirm your site has one preferred origin (https, with or without www, never both) enforced by 301s. Then make sure internal links use that exact form, slash style included. Then check that every page prints a single self-referencing canonical. Those three steps clear the large majority of canonicalization problems we come across on all three platforms, and none of them needs a developer for more than an afternoon.
Canonical issues rarely sit alone. They tend to show up next to weak internal and external linking, messy migrations and slow templates. If you're weighing a rebuild, our comparison of WordPress vs Astro for AI-search-ready sites covers the trade-offs, and our website design and development team handles builds on both.
Nurotech, a unit of Yogya Infomedia Limited, runs technical SEO for businesses on WordPress, Shopify and Astro. If you'd like us to check your canonicals, redirects and indexing report, see our SEO services in Delhi and get in touch.
FAQs
Fill out the form or call us — let’s find where your next growth comes from.
9659 634 634 info@nurotech.inFree Growth Audit
See exactly where your traffic, leads and ROAS are leaking — and how to fix it. A senior Nurotech strategist reviews your website, SEO and ads. Free, no obligation.
No spam. We reply within 1 business day.