Free to explore: filter winning sites by DR, traffic and niche  ·  Try the live explorer →

www vs non-www: which is better for SEO?

A domain name typed into a browser

The www vs non www SEO question has a short answer and a longer practical one. The short answer is that Google does not prefer either. The practical answer is that running both side by side, without a clear choice, creates avoidable duplication and splits signals that should point at one address.

So the useful question is not which to pick but how to commit to the one you pick. This guide covers what Google has said, the few technical differences worth knowing, and the checklist for making one version canonical everywhere.

What Google has said about www vs non-www SEO

In August 2017, Barry Schwartz at Search Engine Roundtable reported an exchange in which Google’s John Mueller was asked whether either version was preferable for SEO. To the view that neither was, his answer was “yep”.

A two laptops side by side

His recommendation was equally plain: “stick to one or the other if you can control it. If not, Google will figure it out anyway.” He described the choice as “more of a brand decision than anything else”.

That settles the ranking question. There is no hidden bonus for www, and no penalty for dropping it. What remains are a handful of technical and practical differences, and the discipline of consistency.

The real differences between the two

Although rankings do not care, infrastructure sometimes does. The differences below are general web-hosting considerations, not Google ranking factors, and for most sites none of them is decisive.

A network cables close-up
QuestionWhat the evidence says
Does Google prefer one version?No. Mueller answered “yep” to the view that neither is preferable
What does Google recommend?“stick to one or the other if you can control it”
What if you cannot control it?“Google will figure it out anyway”
What kind of decision is it?“more of a brand decision than anything else”
What does the SEO work consist of?One version, a 301 from the other, and consistent canonicals, internal links and sitemaps

On the technical side, a www hostname is a subdomain, so it can be pointed at a host or CDN with an ordinary DNS record. A bare domain cannot always do that, depending on what your DNS provider supports. Cookies set on a bare domain are also commonly sent to every subdomain, which matters if you serve static assets from one.

A programmer typing code

These are reasons an engineer might favour one option for a particular setup. They are not reasons to migrate a site that already works. If your current version is established and consistent, leave it alone.

The point many guides miss is that the problem is never the hostname itself. It is the site that answers on both. When https://example.com/page and https://www.example.com/page each return the same content with a 200 status, search engines see two URLs for one page. Google will usually pick one as canonical, which is what Mueller meant by figuring it out, but it may not pick the one you would have chosen, and links earned by each version point at different addresses.

How to choose: brand first

Since the SEO answer is neutral, decide on brand and habit. Shorter, cleaner addresses suit a bare domain in print, on packaging and in conversation. Some organisations prefer www because their audience recognises it as a web address at a glance.

A brand logo on a screen

The more important factor is history. If a site has years of links, citations and printed material pointing to one version, that version should win. Switching an established site is a migration in miniature: every URL changes, and every one needs a redirect. Our guide to 301 vs 302 redirects explains why that redirect should be permanent.

Check what you already have before deciding anything. Look at which version your printed material, email signatures and social profiles use, which one most of your backlinks point to, and which one Google currently shows in results. If those agree, the decision has already been made for you; formalise it. If they disagree, the version with the most established links is usually the cheaper one to keep, because it means fewer of your existing signals have to pass through a redirect.

Make one version canonical everywhere

Once you have chosen, the work is consistency. Every place a URL appears should use the same hostname, so that search engines see one site rather than two copies of it.

Redirect the other version. Set a 301 from every URL on the version you are not using to the same path on the version you are. Not to the home page: to the equivalent page. Check that it is a single hop, and that it plays nicely with your HTTPS redirect rather than chaining through both.

A cookies on plate

Use one version in canonical tags. Self-referencing canonicals should carry the chosen hostname. Our guide to the canonical tag covers the details, and the same logic applies to the trailing slash: pick one form and use it everywhere.

Use one version in internal links and sitemaps. Internal links that point to the redirected version still work, but each one costs a hop and sends a mixed signal. Sitemaps should list only the chosen version. The same goes for hreflang annotations, structured data URLs and any absolute links in email templates or feeds: a single stray hostname in a template repeats across every page that uses it.

Verify a Domain property in Search Console. A Domain property covers both hostnames and both protocols at once, so you can see whether the redirected version is still being crawled or indexed. Our guide to Search Console verification explains the DNS step it needs.

A developer configuring a server

After the changes, test a sample of URLs on both versions, with and without HTTPS, and confirm each lands on the canonical address in one step. Then keep an eye on Search Console’s indexing reports for any pages still being picked up on the old hostname. Leftovers usually trace back to a hard-coded link in a template or an old sitemap.

Duplication across hostnames is one of the more common causes of the problem covered in our post on duplicate content, and it is one of the easiest to fix for good.

One limitation to be clear about. The Mueller exchange dates from 2017, and it is a spoken answer rather than formal documentation. Nothing since suggests a change, and Google’s own advice to stick to one version is consistent with it, but treat it as guidance, not a guarantee about how ranking systems work internally.

Frequently asked questions

Is www or non-www better for SEO?

Neither. Google’s John Mueller agreed that neither is preferable and described it as more of a brand decision than anything else.

Should I redirect www to non-www or the other way round?

Either direction is fine. Pick the version you want to keep and 301 every URL on the other version to the same path on the chosen one.

What happens if I do not choose either?

Mueller said Google will figure it out anyway, but his recommendation was to stick to one or the other if you can control it.

How do I monitor both versions in Search Console?

Verify a Domain property. It covers both hostnames and both protocols together.

The takeaway Choose on brand, not SEO. Then redirect the other version, and use the chosen one in canonicals, internal links and sitemaps without exception.