How to Fix Redirect Chain Contains HTTP Errors
Fix HTTP redirect chains by updating old server rules to point straight to HTTPS destinations, eliminating unnecessary hops and latency.
Learning how to fix a redirect chain that contains HTTP URLs usually comes down to editing an old redirect rule whose destination was hardcoded with http:// instead of https://. When a user or search bot requests the source URL, the server sends them to an insecure address, which immediately triggers your sitewide SSL rewrite and forces a second hop. You can resolve the error by updating the intermediate redirect rule so it points directly to the final, secure HTTPS address.
Why a redirect chain contains HTTP URLs
Auditing tools flag this error when a URL bounces through an unencrypted http:// protocol on its way to a final destination. In most setups, every hop adds network latency, burns crawl budget, and introduces security warnings if a browser attempts to load assets across mixed protocols. These chains typically happen for three reasons, ranked from most to least common:
- Hardcoded HTTP destinations in page-level redirects: When someone creates a 301 redirect rule in WordPress, an
.htaccessfile, or a hosting dashboard, they often paste an old URL containinghttp://. When that rule fires, the server sends the visitor to the HTTP URL, and the server-level SSL rule immediately steps in to issue another 301 to the HTTPS version. - Chained redirects from historical site migrations: Over years of site updates, an old URL structure (such as
http://example.com/2018/post) was redirected to a new path (http://example.com/post). When the site later adopted SSL, sitewide HTTPS rules were added on top without flattening the earlier redirects. - Conflicts between canonical rules and SSL enforcement: A server might handle trailing slashes,
wwwprefixes, and HTTPS in separate passes. For example, requestinghttp://example.com/page/might redirect tohttp://example.com/page(stripping the slash) before redirecting tohttps://example.com/page.
To inspect your current list of URLs, paste your redirect map into the Redirect Chain Analyzer. It detects every chain and loop in your rules, measures how many hops each path takes, and outputs the flattened one-hop replacements you need.
How to identify the insecure hop in the chain
Before changing files on your server, you need to see the exact sequence of headers returned for the flagged URL. You can inspect this using command-line tools or a browser.
The fastest manual test is running curl in your terminal with the -IL flags, which follow each hop and print only the HTTP status codes and headers:
curl -IL https://example.com/old-path
The output will show each status code and the corresponding Location header. A problematic chain looks like this:
- Hop 1:
https://example.com/old-pathreturns a301 Moved Permanentlypointing tohttp://example.com/new-path. - Hop 2:
http://example.com/new-pathreturns a301 Moved Permanentlypointing tohttps://example.com/new-path. - Destination:
https://example.com/new-pathreturns a200 OKstatus.
You can also check the response headers using an HTTP status code checker to confirm which server module or software stack issued the intermediate redirect.
Fixing HTTP hops in Apache (.htaccess)
If your website runs on Apache, your redirect rules live in your root .htaccess file. You will typically find individual page redirects positioned before or after your global SSL rewrite block.
A misconfigured redirect rule usually looks like this:
Redirect 301 /old-service http://example.com/services
To fix the issue, update the target directly to your secure URL:
Redirect 301 /old-service https://example.com/services
Next, ensure your global HTTPS enforcement block sits at the top of your .htaccess file before any page-specific Redirect directives. When using mod_rewrite, place this block first:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Putting the global SSL rewrite first ensures that any incoming insecure request upgrades immediately to HTTPS before hitting path-based rewrite rules, preventing mixed-protocol hops.
Fixing HTTP hops in Nginx
In Nginx, redirect chains containing HTTP frequently occur when a server configuration block redirects an old location to an explicit http:// address, or when the HTTP-to-HTTPS redirect block is misordered.
Inspect your site configuration file (often located in /etc/nginx/sites-available/). First, verify that your HTTP server block does nothing other than direct traffic straight to the HTTPS equivalent:
server {
listen 80;
server_name example.com www.example.com;
return 301 https://$host$request_uri;
}
Do not place individual page-level redirects inside the port 80 block. All path rewrites should live inside the port 443 (SSL) server block. Inside that SSL block, check your return and rewrite statements. Replace any rule pointing to an HTTP target:
# Incorrect:
rewrite ^/old-guide$ http://example.com/new-guide permanent;
# Correct:
rewrite ^/old-guide$ https://example.com/new-guide permanent;
After editing, test the syntax with nginx -t and reload your server configuration.
Fixing HTTP hops in WordPress plugins and Cloudflare
If you manage redirects through a WordPress plugin like Redirection or Rank Math, open the plugin redirect manager and filter your rules by searching for http:// in the target URL field.
Edit every matching entry to use https://. If the target resides on the same domain, you can also use relative paths (such as /new-guide/) instead of full URLs. Relative paths automatically inherit the protocol of the incoming request, removing the risk of forcing an unnecessary downgrade to HTTP.
If you manage routing at the edge through Cloudflare, examine both your Page Rules and Redirect Rules:
- Go to SSL/TLS > Edge Certificates and verify that Always Use HTTPS is enabled.
- Go to Rules > Redirect Rules. Review your active rules to confirm no static destination URLs begin with
http://. - If you use dynamic expressions, make sure you are not concatenating
http://withhttp.request.uri.
If you are re-architecting a large batch of legacy URLs, generating clean mappings avoids manual typos. You can create validated rewrite syntax for Apache, Nginx, or Cloudflare with a 301 redirect generator to ensure all destinations default to HTTPS.
Eliminating internal links that hit HTTP redirects
Fixing server rules solves half the problem. If your internal navigation or content contains links to the original HTTP URLs, your users and search crawlers still trigger a redirect on every click.
Run a site crawl using your auditing tool or look through your CMS database for old links. In WordPress, you can run a database search-and-replace using WP-CLI to change internal references from http://example.com to https://example.com.
Updating your internal links preserves page load speed, avoids wasting server resources on internal redirects, and helps clean up canonical signals across your site. If your site has also accumulated duplicate URL variations from non-trailing slashes or mixed case paths, review our guide on how to fix duplicate content in SEO to align your internal links with your canonical URLs.
How to prevent HTTP redirect chains in future migrations
Redirect chains usually build up silently during redesigns, domain changes, or folder reorganizations. You can keep them from reappearing by adopting three standard deployment practices:
- Always flatten redirect maps before deployment: Whenever you prepare a new batch of redirects, cross-reference them against your existing list. If URL A points to URL B, and URL B now points to URL C, update the first rule so URL A points directly to URL C. You can paste your entire map into our browser-based Redirect Chain Analyzer to identify chains and extract the flattened one-hop rules automatically.
- Audit staging exports for protocol accuracy: Exported URL lists often retain outdated protocol schemes. Before uploading new redirect configurations to your production server, run a text search for
http://across the target column of your CSV. - Keep protocol normalisation separate from path redirects: Configure your web server or edge CDN to handle HTTPS and canonical hostname (www vs non-www) normalisation as a single initial step, ensuring subsequent path rules receive only the canonical protocol and domain.
Frequently Asked Questions
How many redirect hops is too many?
One hop is the target and two is tolerable. Google's documentation describes Googlebot following up to ten hops in one crawl attempt before it records an error and tries again later, so three or more is a problem worth fixing on a schedule rather than an emergency, unless the chain is long, in which case the URL is effectively unreachable.
Do redirect chains lose link equity?
Less than the folklore says. The 15% loss per hop figure has never been confirmed by Google, and Google search engineers have stated publicly that 301 redirects do not lose PageRank. The costs that are demonstrable are crawl budget, latency for the visitor, and the hop limit. Fix chains for those practical reasons.
Should I delete the intermediate redirects after flattening?
No. The middle URLs may still be linked from somewhere you cannot see, and removing their rules turns those links into 404s. Add the flattened rules, keep the old ones, and only retire a rule once its source stops appearing in your logs, which for a link that once mattered can take years.
Why does a redirect tool call a trailing-slash difference a loop?
Because on a server that normalises trailing slashes it is one: the rule sends /a to /a/, the server rewrites /a/ back to /a, and the browser bounces forever. Switch the trailing-slash setting to strict if your server genuinely treats the two as distinct URLs, and the same map is read as an ordinary chain.
Is my redirect map uploaded anywhere when checking for chains?
No. When you paste your rules into the Links to Wild analyzer, they are parsed and walked entirely within your browser. Nothing is sent, logged, or stored on an external server. Because a redirect map represents a comprehensive history of a website structure, privacy is a critical consideration.