DNS
www Subdomain & Redirect
www.yourdomain.com should either work (and redirect to the apex) or not exist - having both serve independent content splits your SEO.
high severityWhat is this?
There are two common problems with www:
- www doesn't resolve at all - users who type
www.yourdomain.comget a connection error - Both www and the apex domain serve content - Google treats them as two separate websites, splitting PageRank
The right setup: pick one canonical domain (most apps use the apex - yourdomain.com), and have the other redirect to it with a 301.
Why it matters
- Broken user experience. Many users still type "www" by habit. If it errors out, they think your site is down.
- SEO dilution. If both serve content, Google sees two sites competing for the same rankings. Your backlinks and PageRank get split 50/50.
- Crawl confusion. Search engines may index the wrong version or both versions of your pages.
How to fix it
- Decide which is canonical:
yourdomain.com(apex) orwww.yourdomain.com- most modern sites use the apex - Add a CNAME record for
wwwpointing to your apex (or your host's redirect service) - Configure a 301 redirect from the non-canonical version to the canonical one
Providers & tools
| Platform | How to set up redirect |
|---|---|
| Vercel | Add www as a domain redirect in project Settings → Domains |
| Netlify | Domain settings → add www → configure to redirect to apex |
| Cloudflare | Rules → Redirect Rules → www.domain.com/* → 301 to https://domain.com/$1 |
| Nginx | server {
server_name www.yourdomain.com;
return 301 https://yourdomain.com$request_uri;
} |
Check if your domain has this issue