localwebadvisor
WIKI← Wiki home

What Is a Redirect Loop?

By FayUpdated Jul 10, 2026EVERGREEN
⚡ THE ANSWER

A redirect loop is an error where a web page keeps redirecting to another URL that eventually points back to the original, trapping the browser in an endless cycle. After a set number of hops, the browser gives up and shows a too many redirects message. It usually results from conflicting redirect rules, a misconfigured HTTP-to-HTTPS or www setting, a plugin clash, or a wrong site URL. Because the browser never reaches a final page, the affected URL becomes completely inaccessible until the conflicting rules are fixed.

What happens
The browser is bounced between URLs endlessly and never loads a page (MDN Web Docs)
Common browser message
ERR_TOO_MANY_REDIRECTS or 'redirected you too many times'
Frequent causes
Conflicting HTTPS/www rules, plugin clashes, wrong site URL settings
Redirect codes involved
301 permanent and 302 temporary redirects (RFC 9110)
Quick first test
Clearing cookies and cache often clears a stuck loop temporarily

What a redirect loop is #

A redirect loop, also called a redirect chain or infinite redirect, happens when a web address sends the browser to another address, which sends it onward, and somewhere along the way the trail points back to a URL already visited, creating a circle with no exit. A redirect is a normal, useful instruction telling a browser that a page has moved to a new location, but when the destinations form a loop, the browser can never arrive anywhere. To avoid hanging forever, browsers cap the number of redirects they will follow, and once that limit is exceeded they abort and show a message such as too many redirects or this page is not working. The affected URL becomes entirely inaccessible while the loop persists. The good news is that a redirect loop is a logic problem in your configuration, not a broken server, so once you find the conflicting rules it is fixable. If a loop has taken pages offline, our /services/website-rescue team resolves these quickly.

How redirects normally work #

Redirects are a standard part of the web and, used correctly, are essential. When a resource moves, the server responds with a redirect status code, most often a 301 for a permanent move or a 302 for a temporary one, plus the new location, and the browser automatically requests that new address (RFC 9110). This is how sites send visitors from an old URL to a new one, enforce HTTPS, or unify the www and non-www versions of a domain. Search engines follow 301 redirects to pass ranking signals to the new page, which is why redirects matter for SEO during a redesign or migration (Google Search Central). Problems arise only when redirect rules contradict each other, so that following them never resolves to a stable final URL. Understanding that redirects are meant to end at a real page, not point in a circle, frames the whole diagnosis. Managing redirects cleanly during moves is a core part of our /services/website-migrations work.

The most common causes #

Redirect loops nearly always come from conflicting rules. A classic cause is a clash between HTTP-to-HTTPS and www-to-non-www settings, where one rule forces HTTPS and another forces a domain variant, and together they bounce the browser back and forth. Misconfigured WordPress site URL and home URL settings are another frequent culprit, especially after a migration or a switch to HTTPS, when the stored addresses no longer match reality. Conflicting redirect plugins, or a redirect plugin fighting with rules in the .htaccess file, produce the same effect. A content delivery network or reverse proxy such as Cloudflare set to a flexible SSL mode while the server also forces HTTPS is a well-known trigger. Incorrect .htaccess or server-config rewrite rules, and even a caching layer serving stale redirects, round out the list. Because the fault is a contradiction between rules, the fix is finding and reconciling them. Our /services/managed-hosting team untangles these server and proxy conflicts routinely.

Diagnosing a redirect loop #

Finding the source of a loop is a process of tracing the hops. Start simply: clear your browser cookies and cache for the site, since a stale cookie can create or sustain a loop, and this sometimes resolves it outright. Then use a redirect-checking tool or your browser's developer tools network tab to watch the actual sequence of redirects and see where it turns back on itself; the pattern usually reveals which two rules are fighting. Note whether the loop affects the whole site or one URL, and whether it involves the HTTPS or www transition, as those clues point to specific settings. Check recent changes, a new plugin, an SSL setup, a migration, since loops often appear right after a configuration change. Our /tools/broken-link-checker and browser developer tools together help map the redirect path. Isolating exactly which addresses are in the cycle tells you precisely which rule to correct rather than guessing.

Fixing conflicting redirect rules #

Once you know which rules conflict, the fix is to make them agree on a single canonical destination. Decide on one preferred version of your URLs, for example HTTPS with no www, and ensure every redirect rule points toward that one target rather than contradicting it. In a WordPress .htaccess file, a single clean block can enforce HTTPS and the chosen domain without looping.

Example
# Clean .htaccess: force HTTPS and non-www in ONE consistent direction
<IfModule mod_rewrite.c>
RewriteEngine On

# Redirect www to non-www AND http to https in a single pass
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC,OR]
RewriteCond %{HTTPS} off
RewriteRule ^ https://example.com%{REQUEST_URI} [L,R=301]
</IfModule>

# Do NOT also add a separate www or https rule elsewhere,
# or in a plugin, or in Cloudflare - competing rules cause the loop.
# Pick ONE place to enforce the canonical URL.

WordPress-specific loop fixes #

WordPress adds a couple of common loop scenarios worth knowing. The most frequent is a mismatch in the site's stored WordPress Address and Site Address settings, which live in the general settings and, at a lower level, in the database. If these point to the wrong protocol or domain, WordPress will redirect visitors toward the stored address, which may itself redirect back, creating a loop. When you cannot log in to fix them because the loop blocks the dashboard, you can set the correct values directly in wp-config.php, which overrides the database. Another WordPress cause is a redirect or SSL plugin conflicting with server rules or with a CDN's SSL mode; disabling the plugin or aligning the SSL setting usually clears it. Caching plugins can also serve a cached loop after you have fixed the underlying rule, so clearing all caches is an essential final step. Our /services/wordpress-development team resolves these WordPress-specific loops and prevents them from recurring after updates.

Cloudflare, proxies, and SSL mode loops #

A particularly common modern loop involves a content delivery network or reverse proxy, most often Cloudflare, sitting in front of a site whose server also forces HTTPS. If the proxy is set to a flexible SSL mode, it connects to your origin server over plain HTTP while telling the browser the connection is secure. Your server, seeing an HTTP request, redirects to HTTPS, the proxy strips it back to HTTP toward the origin, and the cycle repeats endlessly. The fix is to align the SSL modes: set the proxy to full or full strict mode so it talks to the origin over HTTPS, matching what the server expects. More broadly, whenever a proxy is involved, decide in one place, either the proxy or the server, where HTTPS and domain redirects are enforced, and avoid duplicating the logic in both. This kind of layered configuration is easy to get wrong and easy to fix once understood. Our /services/managed-hosting and /services/website-security teams configure proxy and SSL settings that never loop.

Auditing redirects during a redesign #

Redirect loops and chains most often creep in during a website redesign or restructure, when URLs change and new redirects are layered on top of old ones. Before and after any such project, it pays to audit your redirects as a set rather than adding them one at a time. Map every redirect from old URL to new, and confirm each one ends at a live, final page rather than pointing to another redirect, which creates slow chains or outright loops. Tools that crawl your site follow redirects automatically and flag any that loop or chain excessively, giving you a clear list to fix. Consolidate multiple hops into a single direct redirect wherever possible, since each extra hop slows the page and dilutes the ranking signals passed to the destination. Keep a documented record of your redirects so future changes do not reintroduce conflicts. This discipline protects both user experience and SEO during the moves that most often cause problems. Our /services/website-redesign and /services/website-migrations teams audit and consolidate redirects as a standard part of every project.

Preventing redirect loops #

Preventing loops comes down to keeping redirect logic simple and centralized. Decide on one canonical URL structure, a single choice of HTTPS and www or non-www, and enforce it in exactly one place rather than scattering rules across .htaccess, plugins, the CMS, and a CDN. Before adding a new redirect, map how it interacts with existing rules so you do not create a circle. Test any redirect or SSL change on a staging copy first, and always clear caches after changes so stale redirects do not linger. When configuring a CDN, match its SSL mode to your server's setup. Keep a record of your redirects so you can audit them during redesigns and migrations, which are prime moments for loops to appear. When a loop does strike, trace the hops, find the two conflicting rules, and reconcile them toward one target. Because a looping URL is completely inaccessible, treat it as urgent. Our /services/website-migrations and /services/website-rescue teams design and repair redirects that resolve cleanly.

FAQ

What does 'too many redirects' mean?

It means the page is stuck in a redirect loop: it keeps sending your browser from one URL to another that eventually points back, so the browser never reaches a final page. After following a set number of redirects, the browser gives up and shows the error. It is caused by conflicting redirect rules, not a broken server, and is fixable once the clash is found.

How do I fix a redirect loop?

First clear your browser cookies and cache, which sometimes resolves it. Then trace the redirects with developer tools or a redirect checker to see which URLs form the cycle. Reconcile the conflicting rules so they all point to one canonical URL, check your CMS site-address settings, align any CDN SSL mode with your server, and clear all caches afterward.

Why does my WordPress site have a redirect loop?

Common causes are a mismatch in the WordPress Address and Site Address settings, a redirect or SSL plugin conflicting with server rules, or a CDN like Cloudflare using flexible SSL while the server forces HTTPS. If the loop locks you out of the dashboard, set the correct site URLs in wp-config.php, then disable conflicting plugins and clear all caches.

Can Cloudflare cause a redirect loop?

Yes, this is a classic case. If Cloudflare's SSL mode is set to flexible, it connects to your server over HTTP while telling the browser the link is secure. Your server then redirects to HTTPS, and the cycle repeats endlessly. Changing Cloudflare's SSL mode to full or full strict, so it talks to your origin over HTTPS, resolves the loop.

Do redirect loops affect SEO?

Yes. A looping URL is completely inaccessible, so search crawlers cannot reach or index the content, and any ranking signals meant to pass through the redirect are lost. If the loop affects important pages or the whole site, it can quickly harm visibility and traffic. Because the page never loads, both users and crawlers are blocked, making prompt fixes important.

Why does clearing cookies fix a redirect loop temporarily?

Because some loops are sustained by a stored cookie that keeps triggering a redirect. Clearing cookies removes that trigger, so the page may load again for a while. However, if the underlying conflicting rules are still in place, the loop usually returns. Clearing cookies is a useful test and short-term relief, but you still need to fix the root configuration conflict.

How Local Web Advisor checks this for you

Is your own website getting web tech right?

Our free AI audit scans your site and tells you — in plain English — exactly what to fix for web tech and seven other areas, with the business impact and the fix for each. No login needed to start.

Run my free website audit →

Was this helpful?