← Glossary

www vs non-www — Which Should You Use?

Definition

The www vs non-www question is about which hostname is the canonical version of your site: www.example.com or example.com. From a ranking perspective there is no inherent advantage either way — what matters is consistency. Both should resolve, but only one should be the canonical, and the other should 301-redirect to it.

Why consistency matters

  • Search engines treat www.example.com and example.com as different sites by default.
  • Without redirects, link equity from backlinks is split between the two versions.
  • Users can land on either version via direct typing, copy-pasted links, or social shares.
  • Cookies set on the apex domain are shared with all subdomains; cookies set on www are not — a real consideration for some apps.

How to enforce a canonical hostname

  1. Pick one — most large sites use www, many modern brands prefer non-www.
  2. Set up a 301 redirect from the non-canonical version to the canonical one for every URL.
  3. Declare the canonical version in canonical tags, your XML sitemap, and Google Search Console property settings.
  4. Scan your site to make sure no internal links use the wrong hostname.

The www vs non-www debate is settled by consistency, not preference. Pick one, redirect the other, and audit your internal links to make sure nothing references the wrong version.

Crawls your whole site, then keeps watching

Find broken links on your website

Detect dead links, missing images, and redirect loops before they hurt your SEO. Free, no signup required.

Check for broken links