www vs Non-www: Which Should You Use?
Updated 30 October 2026
Jump to section
Neither www nor non-www is better for SEO, because Google ranks both versions the same. What matters is choosing one and redirecting the other, so Google consolidates your ranking signals onto a single address. Google retired its Search Console "preferred domain" setting in June 2019, so today you enforce the choice yourself with a redirect and a canonical tag. Pick one, point everything at it, and move on.
Does www vs non-www affect your Google ranking?
No, the www or non-www choice has no direct effect on how Google ranks a page. The two are read as the same site once you tell Google which one is canonical. The choice is cosmetic for search, not a ranking lever.
When John Mueller backed that view in 2017, Search Engine Roundtable summed it up: "They are both the same for Google."
The real risk is leaving both live and indexed at once. When the same page answers at example.com and www.example.com, Google sees two addresses for one page and may split the signals between them, the same way other duplicate URLs do.
Left unresolved, that split can even leave a page not showing as strongly as it should.
Google removed the old guesswork here. In June 2019 it retired the Search Console "preferred domain" setting. When it finds the same content on two addresses, Google will now pick one URL as the "canonical" for Search (Google Search blog, 18 June 2019). It will choose a version if you do not, but leaving it to chance is a habit worth breaking.
So which one should you pick?
Pick whichever you prefer, then use it everywhere, because consistency matters far more than the version itself. A small business site loses nothing by choosing the shorter non-www address; a larger site with subdomains often keeps www for cleaner setup.
The practical differences are minor and technical, not about rankings.
| Factor | www (www.example.com) |
non-www (example.com) |
|---|---|---|
| Google ranking | identical | identical |
| Cookie scope | domain-wide cookies can stay within www | domain-wide cookies also reach every subdomain |
| CDN and DNS setup | flexible, a CNAME is allowed | the root takes an A record or a provider's ALIAS, not a CNAME |
| Appearance | slightly longer | shorter and cleaner |
| Suits | sites running many subdomains or a CDN | small brochure and business sites |
For a typical small business site, non-www is fine for the cleaner look. The one honest caveat sits in the CDN and cookie rows, covered further down.
How do you enforce one version?
Enforce your choice with a permanent redirect from the version you dropped to the one you kept. Every request for the wrong version should land on the right one, with no exceptions.
Set up a 301 redirect from non-www to www, or the reverse, so both visitors and Googlebot always reach the chosen address. Then add a self-referencing canonical tag naming that same address. The two work together: the redirect moves people, the canonical confirms the preference.
The same 2019 post lists the tools Google accepts for this: a rel="canonical" tag, a canonical HTTP header, a sitemap, and 301 redirects for retired URLs. Keep your internal links, your sitemap, and any backlinks you control pointing at the one version too, so nothing quietly votes for the other.
What about trailing slashes?
A trailing slash is a related but separate consolidation choice, and the same rule applies: pick one pattern and stay consistent. A server can treat example.com/page/ and example.com/page as two different URLs, so mixing them creates the same split-signal problem as www versus non-www.
The root domain is the exception. Google's trailing-slash post (April 2010) says https://example.com is equivalent to https://example.com/. For everything below it, choose slash or no-slash, redirect the other form, and let your pages settle on one shape. Most content platforms handle this for you, so the job is usually to check it, not to build it.
When the version genuinely matters more
For a plain brochure or service site, www versus non-www is close to irrelevant, so do not lose an afternoon over it. Choose the short version and enforce it.
The choice earns real attention only when you run subdomains or set cookies at the domain level. A cookie the bare example.com sets for the whole domain reaches every subdomain, while the same cookie set on www stays within www. Cookies set without a domain attribute stay on their own host either way. Some content delivery networks are also simpler to point at a www address than at a root domain.
A more common trap than the choice itself is leaving both versions live and indexed at once, often a hosting default nobody tidied up. Fixing it needs access to the domain and hosting accounts. In our experience, owners often do not know who holds those accounts, so finding them is the first job.
Frequently asked questions
Is www or non-www better for SEO?
Neither is better for SEO. Google ranks both the same once it knows which one is canonical, so the decision is about preference and setup, not ranking. Non-www looks shorter and cleaner, while www can be easier for large sites with subdomains and content delivery networks. Pick one, redirect the other, and stay consistent everywhere.
Will switching from www to non-www hurt my rankings?
Not if you redirect properly. Move from one to the other with a permanent 301 redirect and update your canonical tags, and your rankings transfer across, though a short dip during recrawling is normal. The damage only comes from switching without redirects, which leaves the old version stranded and can drop it from Google's index until it is recrawled.
How do I know which version Google is using?
Check Google Search Console, or search for your own pages and see which address appears. Search Console reports on the URL Google has chosen as canonical, and its URL Inspection tool names the "Google-selected canonical" for any page. If that version is not the one you want, your redirects or canonical tags are pointing the wrong way.
Do I still need to set a preferred domain in Search Console?
No, that setting no longer exists. Google removed the preferred domain option in June 2019 and no longer uses any old configuration. You now signal your preferred version yourself, through 301 redirects and canonical tags, which is why enforcing the choice on your own site matters more than it once did.
Does the trailing slash matter?
It can, for pages below your root domain. A server may treat an address with a trailing slash and one without as two separate URLs, which splits signals just like www versus non-www does. The root domain itself is unaffected. Choose one pattern, redirect the other, and let your platform keep it consistent.
Can I use both www and non-www at the same time?
You can, but you should not leave both reachable without redirects. If both resolve independently, Google sees duplicate addresses and may split ranking signals or index the version you did not want. Keep one as the live address and redirect the other to it, so only one version ever answers a request.
Pick one and point everything at it
Storming Solutions runs SEO, AEO, and GEO for Malaysian businesses from Kuala Lumpur. Settling the www question is one of the quiet first checks in a technical review, alongside stray redirects and split canonicals. We would rather consolidate a site onto one clean address than watch it compete against itself for the same rankings.
Not sure which version your site is serving, or seeing both in search results? Ask us through the contact page, or read what a canonical URL is next. Our SEO, AEO, and GEO service makes sure every page you publish counts once, on one address.