Skip to content
SEO Audit Checker

www vs non-www: pick one and redirect the other

Your site can usually be reached at both example.com and www.example.com. Search engines treat these as two different sites unless one redirects to the other.

Why it matters

When both versions load, links and ranking signals are split between them and pages can be indexed twice.

Chains of redirects (for example http:// → https:// → www) slow down every visit and can stop crawlers before they reach the final page.

How to fix it

  1. Choose one version. Either is fine for SEO; just be consistent.
  2. Add a permanent 301 redirect from the other hostname to the matching URL on your chosen one, keeping the path.
  3. Redirect http:// straight to the final https:// hostname in one hop.
  4. Use the chosen hostname in canonical tags, internal links and your sitemap.
Example Nginx redirect (www → non-www)
server {
  server_name www.example.com;
  return 301 https://example.com$request_uri;
}