www redirect checker

Check if the redirect between www and non-www versions of your site is configured to prevent duplicates

Free
No sign-up
Instant results

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-path should redirect to example.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.com at 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 domainwww.example.comdifferent-brand.com is a domain migration, not www canonicalization

Frequently asked questions

No, the choice between www and non-www doesn't affect rankings. For Google, both versions are equivalent. What matters is choosing one and setting up a 301 redirect from the alternative version. This consolidates link equity and prevents content duplication in the index.
A canonical tag is a hint for search engines, not a directive. Search engines may ignore it, especially if external links point to both versions. A 301 redirect is a hard rule: the server redirects all requests to the chosen version. It's recommended to use both: 301 redirect as the primary solution and canonical tag as an additional signal.
Set up a 301 redirect from the non-canonical version to the preferred one. Update sitemap.xml to reference only canonical URLs, and update all canonical tags on pages to match. Update internal links to use the canonical form. In Google Search Console, the "Change of Address" tool is for moving between different domains (not www canonicalization), but Google will pick up the redirect within weeks and gradually swap duplicates out of the index.
Yes, and it should be. Best practice: a single redirect that handles both at once, so any combination (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.
Both are permanent redirects. The practical difference: 301 allows browsers to change the request method (a POST may become a GET), while 308 preserves the method. For www canonicalization of regular page URLs (GET requests), they're functionally identical — pick 301 for simplicity and wide recognition. 308 is only meaningful if you redirect non-GET traffic (APIs, form submissions) on the alt hostname, which is rare.