Home >BlogHTTP to HTTPS Redirect Best Practices (Avoid Chains)Published 2026/10/08Updated 2026/10/08Why HTTP to HTTPS migrations create chainsMoving a site from HTTP to HTTPS should be one redirect, not three. In practice it often ends up as three, because nobody plans the hops in advance. The site was reachable at three URLs before the move — plain http, http with www, and https without www — and every one of them now points somewhere, and the somewhere points somewhere else again.That is how a chain forms. http://example.com 301s to https://example.com, and https://example.com 301s to https://www.example.com. Two hops for a user, two round trips for Googlebot, and the second hop is a redirect the search engine has to follow and remember separately.A chain is not a disaster on day one. It becomes a problem when it grows: old campaign URLs, query strings, trailing slashes, country subfolders. Five or six hops later, link equity gets diluted at every stop, crawl budget gets spent on hops instead of content, and any single broken link in the middle turns the whole path into a 404.The fix is boring and reliable: decide the final URL once, then make every old URL point straight at it.The nginx rule that does it in one blockMost chains die at the server config. On nginx, a single server block catches every http request and answers with a direct 301:server { listen 80; server_name example.com www.example.com; return 301 https://example.com$request_uri; }That one block handles both hosts and every path, so http://example.com/about and http://www.example.com/about both land on https://example.com/about in a single hop. The equivalent on Apache is a short .htaccess at the web root:RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^ https://example.com%{REQUEST_URI} [L,R=301]Notice what the configs do not do: no redirect to a staging page, no chained host rules, no per-page exceptions. If you keep the config this flat, chains cannot form at the entry point at all.Step-by-step: redirect to HTTPS without chainsPick one canonical host and stick to it. Choose www or non-www, https only, and a single case convention (lowercase). Write it down where the whole team can see it. This one decision removes half the chain opportunities before they appear.Redirect HTTP to HTTPS at the server, not per page. One rule catches the whole site: any http request, any path, gets a 301 to the same path over https. Nginx and Apache both handle this with a single server block or .htaccess rule.Collapse the www hop. If your canonical host is non-www, http://www.example.com should 301 straight to https://example.com. If it is www, http://example.com should 301 straight to https://www.example.com. Never redirect http://www to https://www to https://non-www — that is a chain of two.Redirect old paths to their direct replacements. When a URL changes during the move — /blog/post.php?id=5 becomes /blog/post-5 — map each old path straight to its new one. The redirect table can be hundreds of lines; that is fine. What is not fine is redirecting /blog/post.php?id=5 to /blog/ and letting the CMS pick the destination.Use 301, not 302, for the permanent move. A 302 tells browsers and crawlers the move is temporary; the old URL keeps its place in the index while every visit bounces through the chain. HTTPS migration is permanent. 301 only.Verify every hop with a real request. After the rules are live, run curl -I on a sample of old URLs and count the Location headers. Any URL that returns more than one hop is a chain you just created. A redirect checker that follows the full path end to end shows the same thing visually.Six steps, and the rule behind all of them is one sentence: one request in, one redirect out, final URL on the other side.A real migration gone rightSay the site lives at http://blog.example.com and the new home is https://example.com/blog/. A chained setup looks like this: http://blog.example.com 301s to https://blog.example.com (good so far), which 301s to https://example.com (host swap), which 301s to https://example.com/blog/ (path swap). Three hops for one URL.The direct setup is one rule per old URL: http://blog.example.com 301s straight to https://example.com/blog/. That is it. Same destination, one round trip, and the old domain's links land their equity on the new page instead of paying tolls along the way.Do this for every old URL you care about — posts, category pages, pagination, the RSS feed. The rule count grows, the hop count does not.Common mistakes that sneak chains inDouble host rules. A rule for www and a separate rule for non-www, each redirecting to the other, then a third rule to https. Clean this up into one canonical target.Redirecting to the homepage. Every old path 301s to /, so the CMS then has to redirect or 404 the rest. Link equity from deep pages lands on the homepage instead of its replacement.Trailing slash drift. /about/ 301s to /about 301s to /about/. Pick one form in the canonical rule and normalize everything else to it in the same rule.Forgetting mixed content. The redirect itself is fine, but the HTTPS page loads http:// images and scripts, and the browser blocks them. Check the console after the move, not just the URL bar.Case-sensitive paths. /About 301s to /about, which 301s back to /About. Lowercase everything at the entry rule, or map case variants explicitly.Most of these show up as the same symptom: a URL that works in the browser but sits at hop two or three in the checker. The browser follows silently, so nobody notices until the crawl reports show pages dropping out. If the redirect checker is part of the deploy checklist instead of a post-mortem tool, the whole class of mistakes gets caught in the staging environment.What to check after the moveStart with the redirect rules themselves: sample fifty old URLs across hosts, paths, and query strings, and look at each hop. Then load a few pages over https with the dev tools console open — mixed-content warnings show up there, not in the address bar. Update the sitemap to https URLs and resubmit it in Search Console. Finally, sweep the content for internal links still pointing at http://; each one is an extra hop for users and crawlers alike.One more check that pays for itself: look at the redirect chain length on your most linked pages. If any of them sits two or more hops from the final URL, fix that specific rule. The redirect chain checker reports hop-by-hop for a batch of URLs, and the step-by-step guide on fixing chains walks through the cleanup when you find one.Give the search engines time after the cutover. Google re-crawls at its own pace; expect the https URLs to fully replace the http ones in the index over a few weeks, not overnight. What you control in that window is consistency: keep the 301s in place, keep the sitemap current, and do not add a second host rule mid-migration because the numbers moved slower than you hoped.FAQShould I use 301 or 302 for HTTP to HTTPS redirects?301. The move to HTTPS is permanent, and 301 passes the old URL's ranking signals to the new one. 302 keeps the old URL in the index and wastes the redirect on every visit.Do redirect chains hurt SEO?Yes, at scale. Every hop dilutes link equity slightly and costs crawl budget. Google recommends keeping redirect chains short, and a single direct hop is the cleanest setup.How many redirects count as a chain?Anything above one hop is a chain in the practical sense. Two hops are tolerable now and a liability later; five hops are a problem today.Should I redirect www to non-www or keep both?Pick one and redirect the other with a single 301. Keeping both live means duplicate content and an extra hop for anyone using the wrong one.Do I need to update my sitemap after moving to HTTPS?Yes. The sitemap should list the https URLs only, and the old http URLs should 301 to their https equivalents. Resubmit the sitemap in Search Console after the switch.What happens if a link in the middle of a chain breaks?The whole path dies — every URL behind the broken hop becomes a 404, including the final destination. This is the strongest argument for one-hop redirects: with a single hop there is no middle link to break.When the migration plan is ready, run the old URLs through a HTTP to HTTPS redirect setup guide and check the result before you cut over.FAQShould I use 301 or 302 for HTTP to HTTPS redirects?301. The move to HTTPS is permanent, and 301 passes the old URL's ranking signals to the new one. 302 keeps the old URL in the index and wastes the redirect on every visit.Do redirect chains hurt SEO?Yes, at scale. Every hop dilutes link equity slightly and costs crawl budget. Google recommends keeping redirect chains short, and a single direct hop is the cleanest setup.How many redirects count as a chain?Anything above one hop is a chain in the practical sense. Two hops are tolerable now and a liability later; five hops are a problem today.Should I redirect www to non-www or keep both?Pick one and redirect the other with a single 301. Keeping both live means duplicate content and an extra hop for anyone using the wrong one.Do I need to update my sitemap after moving to HTTPS?Yes. The sitemap should list the https URLs only, and the old http URLs should 301 to their https equivalents. Resubmit the sitemap in Search Console after the switch.What happens if a link in the middle of a chain breaks?The whole path dies — every URL behind the broken hop becomes a 404, including the final destination. This is the strongest argument for one-hop redirects: with a single hop there is no middle link to break.