www redirect checker
Check if the redirect between www and non-www versions of your site is configured to prevent duplicates
Check results
This check only covers www redirect. For a full picture of your page, run a page audit.
For issues across your whole site — duplicate titles, orphan pages, broken internal links — run a site audit.
Want us to fix what we found? Our team can help.
What is www redirect and why it matters
Technically, example.com and www.example.com are two different hostnames. If both serve content without a redirect, search engines index each as a separate site with identical content — duplicate content, split link equity, weaker rankings. A single 301 redirect from one version to the other consolidates the two into one canonical site. Which one you pick (www or non-www) doesn't affect SEO directly — consistency does.
What this tool checks
- Alt-hostname redirect — probes the alternative hostname (flips www on/off) and checks whether it redirects to the primary
- Redirect status code — 301 / 308 (permanent) vs 302 / 307 / 303 (temporary)
- Redirect target hostname — the Location header should point to the primary domain, not elsewhere
- Path preservation — requesting
www.example.com/some-pathshould redirect toexample.com/some-path, not dump you at the homepage - Alt hostname returning 200 — both versions serve content directly, a duplicate-content problem
- Alt hostname not accessible — users who type the unredirected variant can't reach the site at all
www or non-www: which to choose
From an SEO perspective no difference — pick one and be consistent. Practical considerations:
- Non-www — shorter URL, cleaner-looking, easier to type. Most modern sites default here.
- With www — historically the only way to use a CNAME at the apex (most DNS providers now offer ALIAS/ANAME records for non-www). Also allows cleaner cookie scoping between subdomains.
- Consistency is what matters — whichever you choose, internal links, canonical tags, sitemap.xml, and robots.txt must all use that form. Mixing them signals uncertainty to crawlers.
Good vs bad examples
Good — Nginx 301 redirect www → non-www with path preservation:
server {
listen 443 ssl;
server_name www.example.com;
return 301 https://example.com$request_uri;
}
Good — Cloudflare redirect rule: "When hostname equals www.example.com, redirect to https://example.com + path".
Bad — both hostnames serve 200 responses (duplicate content):
GET https://www.example.com/product → 200 OK
GET https://example.com/product → 200 OK
Bad — redirect loses the path (every URL lands on homepage):
GET https://www.example.com/deep-article
→ 301 Location: https://example.com/ ← should be /deep-article
Bad — temporary 302 for what should be permanent canonicalization:
GET https://www.example.com/
→ 302 Location: https://example.com/
Common mistakes
- Both versions serve 200 — duplicate content issue, split link equity. Most common when DNS was configured for both but the web server lacks the redirect rule
- 302 instead of 301 — temporary redirect signals search engines to keep the alt version in the index longer
- Redirect drops the path — "www.site.com/article" → "site.com/" loses deep-link functionality. Use
$request_uri(Nginx) or%{REQUEST_URI}(Apache) in the redirect target - Missing DNS record for the alt variant — if DNS doesn't resolve
www.example.comat all, the redirect can't run. Add an A or CNAME record for both variants - Inconsistent usage in canonical tags / sitemap.xml / internal links — even with a working redirect, pointing at the non-canonical version internally is sloppy and adds unnecessary redirect hops
- Redirecting to a third domain —
www.example.com→different-brand.comis a domain migration, not www canonicalization
Frequently asked questions
http://example.com, http://www.example.com, https://www.example.com) jumps directly to the canonical https://example.com with the correct path. Chained redirects (HTTP → HTTPS non-www → HTTPS www) add latency and lose a small amount of ranking signal on each hop.