Skip to main content
Cautionary Tale4 min read

The HTTP-to-HTTPS Redirect Loop That Broke Everything

By The bee2.io Engineering Team at bee2.io LLC

Illustration for: The HTTP-to-HTTPS Redirect Loop That Broke Everything

When Your Security Settings Start Fighting Each Other

Imagine you're trying to enter a nightclub. The bouncer says "sorry, you need to go around back." So you walk around back. The other bouncer says "sorry, you need to go around front." You're now in an endless loop of rejection, your shoes are getting worn out, and everyone's pointing at you wondering what you did wrong.

This is what an HTTP-to-HTTPS redirect loop feels like, except browsers are the ones with worn-out shoes and users are the ones pointing.

Here's the thing: HTTPS is objectively good. It's like installing a deadbolt on your front door. But if your deadbolt is wired to a machine that unlocks itself whenever someone locks it, congratulations - you've created security theater. One major e-commerce retailer experienced this exact issue in 2024, resulting in 47 minutes of complete unavailability. That's roughly 312,000 frustrated customers refreshing the page and questioning their life choices.

The redirect loop happens when your server configuration is having an existential crisis. Your web server says "Hey, this HTTP request needs HTTPS!" so it sends visitors to the HTTPS version. But then - plot twist - the HTTPS version has been configured to redirect back to HTTP. It's like a weird security ouroboros eating its own tail while simultaneously having an identity crisis.

How This Beautiful Disaster Unfolds

Let's break down the tragic sequence of events:

  1. User types in your site (usually without the protocol because nobody remembers that stuff)
  2. Browser defaults to HTTP because it's 2026 and people still somehow end up here
  3. Your server intercepts this like a protective parent and says "NOPE, HTTPS only"
  4. Redirects to HTTPS version (good so far, our server is making healthy choices)
  5. But WAIT - your SSL certificate settings or server config is bonkers and redirects right back to HTTP
  6. Browser: "Did I stutter? HTTP again? Fine, I'll follow that redirect..."
  7. Repeat steps 3-6 until the browser gives up like a frustrated job applicant

Most modern browsers will cut off this loop after 20 redirects, displaying an error message that's basically the digital equivalent of throwing their hands up and walking away. Users see the dreaded "ERR_TOO_MANY_REDIRECTS" error, which is about as helpful as a screen door on a submarine.

According to industry data, redirect loops account for roughly 8-12% of all website accessibility issues reported by automated scanners. That might not sound like much until you realize that's like saying "only 8-12% of your restaurant's customers are getting food poisoning." Once is a tragedy. Repeatedly? That's a business model.

The Usual Suspects (Or: How to Debug Your Own Chaos)

Here's where this gets fun - the redirect loop usually stems from one of these beautiful mistakes:

  • Misconfigured .htaccess files - Ah yes, the regex equivalent of writing your will in crayon. One small typo and you've created an infinite loop that makes philosophers weep.
  • Conflicting server rules - Your web server redirects to HTTPS while your application simultaneously redirects to HTTP. It's like having two managers giving you completely opposite instructions while pretending they're on the same team.
  • Mixed content policies gone wrong - You're trying to enforce HTTPS but your config is essentially saying "actually, maybe HTTP is fine too." Commitment issues, but make it infrastructure.
  • Proxy or CDN misconfigurations - Somewhere between your server and the user's browser, a middleman is adding its own opinions about which protocol is cool right now.

Actually Fixing This Mess

The good news: it's usually fixable in about five minutes if you know where to look.

First, test your domain using a redirect checker tool or browser dev tools. Watch the chain of redirects like you're following a conspiracy board with red string. You're looking for any moment where HTTPS becomes HTTP again - that's your villain.

Then audit your server configuration. If you're using Apache, check your .htaccess. If you're on Nginx, inspect that configuration file. Look for redirect rules that are contradicting each other. If they are, one of them has to go - preferably the one redirecting to HTTP, since we're trying to be secure here.

Pro tip: Force HTTPS in exactly one place - your web server configuration or your application logic, not both. Having two sources of truth is how you end up here in the first place.

Want to see if your own site has this problem? Run it through SCOUTb2 and watch what actually happens when we follow your redirects. No pressure, but wouldn't you rather find out now instead of when a customer tries to buy something and just... can't?

Disclaimer: This article is for informational purposes only and does not constitute legal, professional, or compliance advice. SCOUTb2 is an automated scanning tool that helps identify common issues but does not guarantee full compliance with any standard or regulation.

securityHTTPSredirectsserver config

Stop finding issues manually

SCOUTb2 scans your entire site for accessibility, performance, and SEO problems automatically.