Skip to content

Comparisons Website building Beginner1 min read

www vs non-www: Which Should Your Website Use?

Should your site live at www.example.com or example.com? The technical differences, the SEO reality, and how to set up the redirect either way.

By ZSOLNET Editorial Team Updated

Key takeaways

  • www and non-www rank equally — consistency is what counts.
  • A CNAME on www is easier with CDNs.
  • Redirect the other version with a 301 and cover both with SSL.

Both work, and search engines treat them equally. What matters is choosing one and redirecting the other to it.

The differences

www.example.comexample.com
LooksTraditionalShorter, modern
DNSCan be a CNAME (flexible with CDNs)Usually needs an A record
CookiesCan be scoped to www onlyCookies set on the bare domain are sent to all subdomains
SEOEqualEqual

When www has a technical edge

  • CDNs and load balancers often give you a hostname to point at. A CNAME on www is straightforward; the bare domain can’t have a CNAME (some DNS providers offer a workaround called ALIAS or CNAME flattening).
  • Cookie isolation — large sites with many subdomains can keep cookies off static-file subdomains.

For most small and medium sites, neither matters much.

What actually matters

  1. Pick one canonical version.
  2. 301-redirect the other to it, keeping the path.
  3. Use it consistently in your CMS settings, sitemap, canonical tags and links.
  4. Cover both with your SSL certificate, so the redirect works over HTTPS.

Redirect non-www to www (.htaccess)

RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
Share X LinkedIn Facebook

Log in to your account

Manage your domains, hosting and invoices in one place.

Secure connection straight to the ZSOLNET client area.

No account yet?