On this page
What this issue is
Your site can be reached at several addresses: http://example.com, http://www.example.com, https://example.com and https://www.example.com. You should pick one as the preferred (canonical) address and redirect the other three to it.
A double redirect happens when the redirect rules are stacked. The first rule fixes one thing (for example, adds https), and the second rule fixes another (for example, removes www). The visitor makes two extra requests before the page starts to load.
- Ad clickhttp://www.example.com/offer?gclid=abc
- Hop 1: 301Adds https, keeps www
- Hop 2: 301Removes www
- Landing pagehttps://example.com/offer
Two redirects run one after the other before the real page is served.
Why it costs you leads or sales
Each extra redirect is a full round trip: DNS lookup, connection, TLS handshake and a response, all before any of your content arrives. On a slow mobile connection this can add a noticeable delay. Visitors who see a blank screen for longer are more likely to leave.
The impact is usually small, which is why this issue is rated low. It grows with paid traffic, because every ad click pays the delay. A badly written second rule can also drop the query string, which would lose gclid and UTM parameters. Check that your redirects keep them.
Example: illustrative delays on a mobile connection. Your real numbers will differ.
How to check if your site has it
Request each of the four address variants and count the hops. You want one redirect at most, and the exact same final URL every time.
for u in http://example.com http://www.example.com https://example.com https://www.example.com; do
echo "== $u"
curl -sIL -o /dev/null -w '%{num_redirects} redirects, final: %{url_effective}\n' "$u/?utm_source=test"
doneFor the detail of each hop, run curl -sIL http://www.example.com/ and read the HTTP/ and location: lines. If num_redirects is 2 or more for any variant, you have a chain. Also check that utm_source=test is still in the final URL.
| Start URL | Redirects | Final URL |
|---|---|---|
| http://example.com | 1 | https://example.com |
| http://www.example.com | 1 | https://example.com |
| https://www.example.com | 1 | https://example.com |
| https://example.com | 0 | https://example.com |
How to fix it
The principle is the same everywhere: decide on one preferred address, then send every other variant straight to it. The redirect target must already include both the https scheme and the preferred host. The steps differ by platform.
Set one address
Go to Settings > General and make WordPress Address (URL) and Site Address (URL) identical, using your preferred host and https.
Remove duplicate rules
Check your redirect or SSL plugins and your host's control panel. Keep one rule that does both the https and host change, and turn off the others.
Check .htaccess
On Apache, look for stacked RewriteRule blocks and replace them with the single rule shown under Custom code.
Set the primary domain
Go to Settings > Domains and choose your primary domain. Shopify then redirects the other domain to it.
Remove extra redirects
If your DNS provider or another service also redirects www or non-www, turn that off so only Shopify redirects.
Pick the default domain
Open Project settings > Publishing and set one domain as Default. Webflow redirects the other to it.
Turn on SSL
Enable SSL hosting so http goes to https. Remove any extra redirect from your DNS provider.
Set the primary domain
Go to Domains in your dashboard, open the domain's menu and choose Set as primary. Wix redirects the other variants to it.
Remove DNS-level redirects
If your registrar forwards the other host, turn that forwarding off so there is no second hop.
Set the primary domain
Go to Settings > Domains, choose the domain and use Use as primary.
Check registrar forwarding
Disable any domain forwarding at your registrar that adds a hop before Squarespace.
Check the domain setup
In your funnel or website domain settings, connect the preferred host. Where the option exists, use the built-in redirect for the other host.
Remove outside redirects
If your DNS provider or registrar also forwards the other host, turn that off so only one redirect runs.
Use one rule
Write one rule that sends any request not on the preferred host and https straight to https://example.com. See the Apache and Nginx snippets below.
Keep the query string
Make sure the rule keeps the path and query string, so gclid and UTMs survive.
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteRule ^ https://example.com%{REQUEST_URI} [L,R=301,QSA]server {
listen 80;
listen 443 ssl;
server_name example.com www.example.com;
# ssl_certificate lines go here; the certificate must cover both names
if ($host != "example.com") { return 301 https://example.com$request_uri; }
if ($scheme = http) { return 301 https://example.com$request_uri; }
# ... rest of your config
}Before
- http://www goes to https://www, then to https://example.com
- Two extra round trips for every ad click
- Second rule may drop the query string
After
- Every variant goes straight to https://example.com
- One redirect at most
- Path and query string preserved
How to confirm it's fixed
Rerun the curl check
Run the loop from the check section. Every variant should show 1 redirect or fewer and the same final URL.
Test with parameters
Open http://www.example.com/?gclid=test&utm_source=test and confirm both parameters are still in the final address bar.
Clear caches
Browsers remember 301s. Test in a private window or with curl, and purge your CDN cache if it holds old redirects.
Check Search Console
Make sure your preferred host is the one you have set up as a property, and that your sitemap and canonical tags use it.
How to prevent it happening again
- Write down your one preferred address and use it everywhere: ads, sitemap, canonical tags, internal links, email links.
- Keep redirect rules in one place, not split across plugin, host and CDN.
- Re-check all four variants after changing hosts, CDN, SSL or domain settings.
- Use final URLs in ad campaigns so clicks skip the redirect entirely.
- Keep the SSL certificate valid for both the www and non-www names.
How FunnelGuard handles this
FunnelGuard detects this today. A redirects check follows the redirect path a robot visitor sees when it opens your page, and flags when the chain has more hops than it should, such as a www/non-www double redirect. The robot runs on a schedule from the EU or the US, so you find out if a host, CDN or plugin change brings the chain back. It flags the chain, but it will not tell you which layer adds the hop, so use the curl check above to trace it. The Free plan covers 1 site and 2 journeys with daily checks and no card, and a free read-only website audit is available too.
Questions people ask
Why does my site redirect twice before loading?
Usually two separate rules each fix one thing: one adds https and another switches between www and non-www. Each runs after the other, creating two hops. Combine them into one rule that sends every variant straight to the final https address.
How many redirects is too many?
Aim for one redirect at most between any address variant and your final page, and zero for the preferred address itself. Two hops work but add avoidable delay, especially on mobile. Three or more should be fixed.
Is a www to non-www redirect bad for SEO?
No, a single 301 redirect to your preferred host is normal and recommended. The problem is stacked or inconsistent redirects, which add delay and can confuse crawlers. Pick one host, redirect to it once, and use it in canonical tags and sitemaps.
Should I use www or non-www?
Either works, so pick one and stay consistent. The www version gives some setups more flexibility with DNS and CDNs, while non-www is shorter. What matters is that all other variants redirect to your choice in one hop.
Does a redirect remove gclid and UTM parameters?
It can, if the redirect rule drops the query string. A correct rule keeps it, for example with the QSA flag in Apache or $request_uri in Nginx. Test by opening your URL with ?gclid=test&utm_source=test and checking the final address.
How do I check my redirect chain?
Run curl -sIL on your URL and read each location header, or use curl's num_redirects write-out to count hops. Test all four variants: http and https, with and without www. Each should end at the same URL in one hop or fewer.
Why do I get a browser warning on the www version?
Your SSL certificate probably does not cover the www name. The browser checks the certificate before it follows the redirect. Reissue the certificate so it covers both example.com and www.example.com.
Related issues
- PRF-067Redirect chain adds 1+ s before first byteFix guide
- PRF-068http to https redirect missing or slowFix guide
- PRF-054Cache busted by UTM/gclid query params so ad traffic is never cachedFix guide
- PRF-070DNS lookup slow or failing intermittentlyFix guide
- PRF-071TLS handshake slow / old TLS versions onlyFix guide
- PRF-072SSL certificate expiring soonFix guide