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.comandexample.comas 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
- Pick one — most large sites use www, many modern brands prefer non-www.
- Set up a 301 redirect from the non-canonical version to the canonical one for every URL.
- Declare the canonical version in canonical tags, your XML sitemap, and Google Search Console property settings.
- 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.
Related terms
301 Redirect
The permanent redirect that preserves link equity and guides users.
XML Sitemap
The map you give search engines to discover and prioritize your pages.
Internal Link
Links between pages on the same domain — the backbone of site structure.
Backlink
An inbound link from another site — the original ranking signal.
Link Equity
The ranking value passed through links — also known as "link juice".
Canonical URL
The preferred version of a page — preventing duplicate content issues.