www and non-www canonicalization
example.com and www.example.com are two hosts to a browser and to Google. Why both serving the site splits your signals, and how to pick one.
What it is
This check takes the host you entered, works out its counterpart — adding www. or removing it — and requests that. If the counterpart answers without redirecting to the host you entered, both are serving the site independently.
When the counterpart does not resolve at all, the check skips rather than fails. A domain with exactly one host serving it has already achieved what this check is asking for.
Why it matters
To a browser, and to a search engine, www.example.com and example.com are different hosts that happen to look similar. Two hosts serving identical content is duplicate content: links, rankings and crawl budget divide between two addresses instead of accumulating at one.
Which one you pick genuinely does not matter — there is no ranking advantage either way, and anyone who tells you otherwise is selling something. What matters is that one of them redirects to the other permanently, with a 301, so the choice is unambiguous and the redirect is cacheable.
How to fix it
server {
listen 443 ssl;
server_name www.example.com;
return 301 https://example.com$request_uri;
}RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteRule ^(.*)$ https://example.com/$1 [L,R=301]https://www.example.com/* https://example.com/:splat 301!Related checks
4This is one of the 75 checks the scanner runs. See what we check for the full list, every severity weight, and how the score is computed from them.