Skip to content
FunnelGuard

Fix guide by FunnelsGuard

www and non-www behave differently: how to find and fix it

OPS-017Medium impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

The apex (also called the root or naked domain) is example.com. The www version is www.example.com, a subdomain. They are set up separately in DNS and on your host, so one can work while the other does not.

Typical symptoms: the apex times out or shows a parked page, www shows a certificate warning, one version loads the old site, or the redirect between them drops the query string (?gclid=..., UTMs).

Why it costs you leads or sales

People type, link and print whichever version they remember. Ads, emails, QR codes, business cards and old backlinks may use the broken one. Those visitors see an error and leave, and you rarely hear about it because nothing is recorded.

Visitor arrives on the broken version
  1. Ad or link to example.comApex version used
  2. DNS / SSL / serverNo record, bad certificate or wrong site
  3. Landing pageNever loads
  4. Lead formNever seen

The visitor who types the apex never reaches the form.

Clicks by address versionExample numbers
Clicks by address version (example)Clicks to www (works): 600 visits; Clicks to apex (error): 400 visits0230460600400Clicks to www (works)Clicks to apex (error)visits

Example: 1,000 ad clicks split across both versions; only the www half can convert while the apex is broken.

How to check if your site has it

Test both versions
  1. Open all four variants

    In a private window, load http://example.com, https://example.com, http://www.example.com and https://www.example.com. Each should end on one final https address with no warning.

  2. Check the redirect chain

    Run curl -sIL against each variant and read the status codes. You want a single 301 to the preferred version, then 200.

  3. Test with parameters

    Add ?utm_source=test&gclid=abc to each and confirm the final URL still has them.

  4. Check DNS

    Run dig example.com and dig www.example.com (or use your DNS provider's panel) to see that both resolve.

Check each variantbash
for u in http://example.com http://www.example.com https://example.com https://www.example.com; do
  echo "== $u"
  curl -sIL "$u/?utm_source=test&gclid=abc" | grep -iE '^(HTTP|location)'
done

How to fix it

Decide which version is your canonical (preferred) one. Then make sure both resolve, both have a valid certificate, and the other one 301 redirects to it, keeping the query string.

Both versions handled

Before

  • www loads, apex times out
  • Certificate covers only one name
  • Redirect drops ?gclid and UTMs

After

  • Both names resolve in DNS
  • Certificate covers both
  • One 301 to the preferred version, parameters kept
Fix by platform
  1. Align the URLs

    In Settings > General, set WordPress Address and Site Address to your preferred version.

  2. Fix DNS and SSL at the host

    Make sure both names point to the host and are added as domains so the certificate covers both.

Nginx: redirect apex to www, keeping the query stringnginx
server {
  listen 443 ssl;
  server_name example.com;
  # ssl_certificate must cover example.com
  return 301 https://www.example.com$request_uri;
}

How to confirm it's fixed

Confirm
  • All four variants end on one https address with status 200
  • Only one 301 hop, not a chain
  • No certificate warning on either name
  • UTMs and gclid survive the redirect
  • Your ad final URLs and email links use the preferred version

How to prevent it happening again

Habits
  • Re-test both versions after any DNS, host, CDN or SSL change
  • Renew certificates for both names together
  • Use the preferred version in all ads and campaigns
  • Keep a record of your DNS settings before migrations

How FunnelGuard handles this

FunnelGuard does not check this yet. Comparing the www and apex versions of a site is a possible future check. Today, a FunnelGuard robot runs your real customer journeys from the start URL you give it, so it only exercises the version you configured.

To watch for it now, add a recurring calendar reminder to run the curl test above after any DNS or hosting change, or set up a free uptime monitor in another tool for both the apex and www addresses. You can also add a second journey in FunnelGuard that starts from the other version, which checks that journey runs, though it is not a dedicated comparison check.

Questions people ask

Why does my website work with www but not without it?

The apex domain and the www subdomain have separate DNS records and server settings. Most often the apex has no A record, or the certificate or host does not include it. Add the missing record and domain, then redirect one version to the other.

Should I use www or non-www?

Either works for SEO and users, as long as you pick one and 301 redirect the other to it. Use the same version in your ads and links. A www subdomain can be easier to manage with some DNS and CDN setups.

How do I redirect non-www to www?

Add a 301 redirect from the apex to the www version in your server config, host settings or platform domain settings. Preserve the path and query string so parameters like gclid survive. Then test with curl -I.

Why does my domain show a certificate error only on one version?

The SSL certificate was probably issued for just one name. Reissue it to cover both example.com and www.example.com, or use a wildcard or the host's auto-SSL after adding both domains.

Can a www redirect break my Google Ads tracking?

Yes. If the redirect sends visitors to a fixed address, the gclid and UTM parameters are lost, so conversions may not be attributed. Use a redirect that keeps the full query string.

Can I use a CNAME on the apex domain?

Standard DNS does not allow a CNAME at the apex alongside other records. Use an A record, or an ALIAS/ANAME/CNAME-flattening record if your DNS provider supports it.

Does FunnelGuard detect www and apex mismatches?

No, not yet. It is a possible future check. FunnelGuard runs your journeys from the start URL you set, so you can add a journey for each version and use the manual curl test for a direct comparison.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.