Indexability and crawling

How to fix www and non-www serving the same site

Both www.yoursite and yoursite serve the site directly. Search engines treat them as two sites with identical content, which splits the value of every link you have ever earned between them.

What it is, and what it costs

Your domain can answer at the www and non-www hostnames. When both return the site with a 200 instead of one redirecting to the other, you have two full copies of every page. Links, rankings, and authority get divided across the pair instead of compounding on one.

How to fix it

Pick one form as canonical and make the other 301-redirect to it, at the server or CDN level.

  • Nginx / Apache: add a permanent redirect from the non-preferred host to the preferred one.
  • Cloudflare / host panel: most have a one-click "redirect www to root" (or the reverse) rule.
  • WordPress: set your Site Address (Settings → General) to the form you chose; the redirect still needs to be enforced at the server or CDN.

How to check your site

Load both https://www.yoursite.com and https://yoursite.com. One should 301-redirect to the other, not both load independently.

Questions people ask

www or non-www: which is better for SEO?
Neither ranks better. Pick one, redirect the other, and stay consistent.

Does your site have this?

Check your site to see whether www and non-www are consolidated.

See also

All SEO checks →