Choose one version as your canonical, either www or non-www, and 301 redirect the other to it, then do the same for trailing slash and HTTP variants, so every page is reachable at exactly one address. The first thing to settle is that which one you pick, www or non-www, does not matter for SEO. They are equally fine, and the decision is about preference and consistency, not ranking. What matters is that you pick one and enforce it, because the real problem is serving the same page at several addresses without redirecting. If both www and non-www resolve, or both the slash and no slash versions load, search engines see duplicates of every page and have to guess which to rank, which splits signals across versions and weakens all of them. A migration is exactly when this breaks, because a new platform or server may answer on a variant the old one used to redirect. So set one canonical host, redirect the alternates to it, and make your internal links use the chosen form. WPBuildAI scans your site and returns the URL list, so you can see which variants resolve and confirm each page has a single address.
Google made this explicit in June 2026: its site move guidance now asks for Change of Address requests covering all subdomains and both the www and non-www variants of the old domain, including ones you believed were inactive, because variants are precisely where duplicates survive.
The choice itself does not matter
Let us settle the headline question first, because people agonize over it needlessly. There is no SEO advantage to www over non-www or the reverse. Search engines handle both equally, and major sites use each. The decision comes down to preference: non-www is shorter and increasingly common, while www has some technical conveniences at the infrastructure level. Either is correct. So do not spend energy debating the choice; spend it on the part that actually affects SEO, which is consistency. Pick the one you prefer, then make it the single canonical form everywhere. The cost is never in the choice; it is in failing to enforce whichever choice you made.
The real problem is duplication
The thing that hurts SEO is not www or non-www; it is both resolving at once. When a page loads at both www and non-www, or at both the trailing slash and no slash versions, each variant is a separate URL serving the same content. Search engines then see duplicates and must decide which to index and credit, as the guidance on consolidating duplicate URLs describes. The effect is that signals which should accumulate on one page get split across its variants, so no single version is as strong as it should be. Duplication does not usually cause a dramatic crash; it causes a quiet underperformance that is easy to overlook because every version looks fine on its own.
Why migrations reintroduce variants
This problem is special to migrations because the old site often solved it invisibly. The previous server or platform may have quietly redirected www to non-www, or stripped trailing slashes, so you never saw duplicates. A new platform starts fresh and may answer on every variant by default, resurrecting the duplication the old setup suppressed. Because the content looks identical, nobody notices that the new server now serves the same page at two or three addresses. This is why a migration is the moment to check variants explicitly: the duplication can appear even though you changed nothing about your pages, simply because the new infrastructure lacks the rules the old one had.
The fix: one canonical, redirect the rest
The robust fix is enforcement by redirect. Choose your canonical host and path form, then 301 every alternate to it: www to non-www or the reverse, slash to no slash or the reverse, and HTTP to HTTPS. After the redirects, only one address per page actually resolves, so there is nothing to duplicate and nothing for search to guess. This is the same 301 mechanism used in any site move, applied to host and path variants rather than to a structural change. Redirects are stronger than canonical tags here because they remove the alternate addresses entirely, rather than merely hinting which is preferred. Tags help; redirects decide.
Make your internal links consistent
Redirects catch requests that arrive at the wrong variant, but your own site should also speak in one voice. Update internal links so they all use the canonical form, avoiding unnecessary redirect hops and making the chosen version unambiguous. If half your internal links point at www and half at non-www, every click on the wrong half bounces through a redirect, which is slower and muddies the signal even though it still works. Consistency in your own markup reinforces the canonical choice and keeps the site clean. Web Almanac 2024 (HTTP Archive) is a reminder of how many internal links a site carries, so this is worth doing in templates rather than by hand.
Reinforce with canonical tags
After redirects and consistent links, add self referencing canonical tags on the surviving URLs as a final reinforcement. A canonical tag tells search engines the preferred address even in edge situations the redirects might not cover, such as URLs with tracking parameters. It is a hint rather than an enforcement, so it supports the redirects rather than replacing them, a relationship covered in what happens to canonical tags after a migration. The order of strength is clear: redirects first to remove the alternates, consistent internal links second to speak in one voice, and canonical tags third to reinforce. Used together, they make the canonical form unmistakable to every reader.
Steps to consolidate URL variants
- Pick one canonical host, www or non-www, by preference.
- Check which variants resolve: www, non-www, slash, no slash, HTTP.
- 301 every alternate to the canonical host, path form, and HTTPS.
- Update internal links to use the canonical form throughout.
- Add self referencing canonical tags on the surviving URLs.
- Recheck after the migration, since a new server may answer on a stray variant.
Worked example: a migration that resurrected duplicates
Imagine a site that moves to a new host and soon sees its rankings drift slightly without an obvious cause. A variant check reveals the issue: the old host redirected www to non-www, but the new host answers on both, so every page now resolves at two addresses, and a few also load with and without a trailing slash. Nothing about the content changed; the new infrastructure simply lacks the old redirect rules. The team picks non-www as canonical, adds 301s from www to non-www and from slash to no slash, updates internal links to the canonical form, and adds self referencing canonicals. Within weeks the duplicates collapse to single addresses and the drift reverses. The fix was not changing the choice, but enforcing one, the same discipline as avoiding duplicate content in a redesign.
Limitation: consolidation does not improve content
It is fair to mark the limit. Consolidating variants removes a drag on your rankings; it does not add a boost beyond recovering the signals that duplication was splitting. So the gain is real but bounded: you get back what fragmentation was costing you, not more. If a page ranked poorly for reasons of content or relevance, fixing its URL variants will not lift it, because duplication was not its problem. Treat variant consolidation as basic hygiene that lets your existing signals count fully, and address content and relevance separately. Clean URLs are a foundation, not a growth tactic.
Common mistakes
- Debating www versus non-www as if the choice affected SEO.
- Letting both www and non-www resolve without a redirect between them.
- Serving both trailing slash and no slash versions of the same page.
- Mixing canonical forms in internal links, causing redirect hops.
- Assuming the new host inherited the old one’s redirect rules.
Key points
To avoid duplicate URLs after a migration, pick one canonical version, www or non-www, and 301 redirect the other to it, then enforce one trailing slash form and HTTPS as well. Which you choose does not matter for SEO; serving the same page at several addresses without redirects does, because it splits each page’s signals across duplicates. Migrations often reintroduce a stray variant the old server quietly redirected, so check explicitly which variants resolve after the move. Enforce the choice with 301s, make internal links consistent, and reinforce with self referencing canonical tags. This pairs naturally with moving from HTTP to HTTPS and with keeping a clean structure when you change permalink structure without losing SEO. WPBuildAI scans your site and returns the URL list, so you can see which variants resolve and confirm each page has a single address. Send your web address for a free analysis.
Not affiliated with WordPress, Lovable, Webflow, Shopify, Wix, or Squarespace.