You’ve seen the debates. Maybe your developer told you one thing. Your SEO guy told you another. You read some Reddit thread from 2014 that got you spiraling about www vs non-www, canonical domains, and losing all your traffic.
Let’s clear this up.
What matters is that you pick one and redirect the other, properly. That’s it.
Let’s walk through it, squash the myths, show you exactly how to handle it technically, and explain how to make sure your SEO doesn’t get wrecked when switching.
www.example.com
is technically a subdomain of example.com
example.com
(non-www) is called the root domain or apex domainLet’s say your site loads at both:
https://example.com
https://www.example.com
Google now sees these as two different sites unless you tell it otherwise. That’s duplicate content, wasted crawl budget, split backlinks, SEO disaster territory.
301 redirect the non-canonical version to the canonical version.
www.example.com → example.com
example.com → www.example.com
Done properly, search engines won’t care. They’ll respect your preference and consolidate authority to the one you chose.
If you’re on Apache, here’s how to enforce non-www:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,R=301]
Want to force www instead?
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^ https://www.example.com%{REQUEST_URI} [L,R=301]
And if you want a super clean regex rule that works for any domain?
# Force non-www (generic)
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
# Or force www (generic)
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Use one or the other. Not both. Not conditional. Not random. Just pick a side and stay there.
https://example.com
https://www.example.com
Google is smart. If you’re consistent, it will follow your lead.
<link rel="canonical">
uses the new domain version.If you’re a Headless Hostman customer, our Full Site Push services do the replacements automatically for you.
You’re not losing rankings just because you chose non-www. You’re not smarter because you picked www. You’re not losing traffic because your dev forgot to update Search Console last week.
Search engines rank based on content, structure, speed, user experience, backlinks, and consistency.
Whether you use www or not has:
So chill. Execute well. Monitor with Google Search Console.
And if you need help fixing it.
Pick a version. Redirect the other. Reflect it in your sitemap. Submit to Google. Done.
Our Static WordPress service requires the www — or another subdomain — for Static Live Sites.
Unless you migrate your nameservers to Cloudflare.
Static serves from a bucket of static files. It’s difficult to route an @ cname at it without CNAME flattening to mimic a non-www.
Luckily, it’s an easy fix. Migrate your nameservers and manage your DNS through Cloudflare.
Otherwise, keep it where it’s at and use the www-version. We’ll make sure all of your bases are covered.