Error reference Browser & network

How to fix ERR_TOO_MANY_REDIRECTS

Chrome shows ERR_TOO_MANY_REDIRECTS — Firefox says the page isn't redirecting properly — when a URL keeps redirecting in a circle and the browser gives up after about 20 hops. The loop usually lives in server config, cookies, or geo logic; and if you scrape through rotating proxies, an IP change mid-chain can create a loop that exists nowhere else. Here's how to break it.

ERR_TOO_MANY_REDIRECTS

What ERR_TOO_MANY_REDIRECTS means

The error is a client-side circuit breaker, not a server status code. Each 301, 302, 307, or 308 response points to another URL; when the chain exceeds the browser's cap (Chrome stops around 20 hops), the browser aborts and reports ERR_TOO_MANY_REDIRECTS. The classic shapes are A -> B -> A ping-pong loops and A -> A self-redirects.

Most loops come from contradictory rules: an HTTP-to-HTTPS redirect fighting a CDN or load balancer that talks plain HTTP to the origin, www and non-www canonicalization pointing in both directions, a CMS site-URL setting that disagrees with the web server's rewrite rules, or a stale cookie that keeps re-triggering a login, consent, or region redirect.

For scraping and automation there's a second family: geo and locale redirects. Sites that route visitors to a country-specific version decide per request, based on the visitor IP. If your exit IP changes between hops, the site can bounce you between regional variants indefinitely — a loop that only exists because of rotation.

ERR_TOO_MANY_REDIRECTS

How to fix ERR_TOO_MANY_REDIRECTS

Work through these in order — the first three clear the majority of cases. In scripts, reproduce the failure with curl so you can see the exact chain instead of guessing.

  1. Clear cookies for the affected site (or reset your script's cookie jar). A stale session, consent, or region cookie is the single most common trigger, and the loop often disappears immediately.
  2. Trace the chain with curl -sIL https://example.com/ | grep -iE 'HTTP|location' to print every hop; a loop shows up as the same two URLs alternating.
  3. Check for a protocol mismatch: if the origin server forces HTTPS while a CDN or load balancer in front of it connects to the origin over plain HTTP, every request loops. Align the SSL mode end to end.
  4. Look for contradictory canonicalization — www vs non-www, a trailing slash added by one rule and stripped by another, or an HTTPS redirect chained with a domain redirect in the wrong order.
  5. If it's your site, compare the CMS base URL setting with the web server or .htaccess redirect rules; WordPress with a mismatched site URL is a textbook loop.
  6. Test from an incognito window and a different network — if it works there, the problem is cached redirects or cookies on the failing client, not the server.
  7. Scraping through rotating proxies? Pin one exit IP for the whole redirect chain (sticky session) and persist cookies between hops before you change anything else.
  8. Only after the loop is fixed, revisit your client's redirect limit; raising max redirects on a genuine loop just makes it fail slower.
ERR_TOO_MANY_REDIRECTS

When proxies cause the loop — and when they fix it

A redirect chain is not atomic. If hop one exits from Germany and hop two exits from Brazil, a geo-aware site may send hop two to its Brazilian variant, whose logic redirects back based on cookies or headers set during hop one — and around you go. The same pattern breaks consent walls and login flows that bind a redirect to the IP that started it.

The fix is consistency across the chain: same exit IP, same country, same cookie jar. On ProxyOmega you control all three from the username string, so no proxy-side changes are needed — the settings travel with each request.

Sticky sessions hold the chain together

Append -session-<id> to your ProxyOmega username and every request carrying that ID keeps the same exit IP for up to 24 hours — far longer than any redirect chain plus the browsing session that follows. Rotate by changing the session ID between jobs, not mid-chain.

Country targeting stops locale ping-pong

If you scrape a German storefront, exit from Germany every time with -country-de. Mixed-country exits are the root of most redirect loops that appear only behind rotating proxies. ProxyOmega offers country targeting across 200+ countries on Budget Unlimited, and country, state, and city targeting on Platinum when the locale logic is regional rather than national.

One fixed IP when nothing may change

Login and consent flows that hard-bind to an IP are simplest through a Static ISP proxy — one dedicated static US ISP IP that behaves like ordinary broadband and doesn't change between requests. On Budget Unlimited, per-port interval rotation means the IP holds for the whole interval window rather than changing per request, which already keeps short chains on one exit.

ERR_TOO_MANY_REDIRECTS

A redirect-safe proxy request in Python

This example keeps one exit IP and one cookie jar across the entire redirect chain, sets a sane redirect cap so genuine loops fail fast, and prints every hop so you can see exactly where a chain starts cycling.

import requests

PROXY_USER = "USERNAME-country-us-session-job42"   # sticky exit IP, US only
PROXY_PASS = "PASSWORD"                            # your dashboard API key
PROXY = f"http://{PROXY_USER}:{PROXY_PASS}@residential.proxyomega.com:10000"

s = requests.Session()                  # one cookie jar for the whole chain
s.proxies = {"http": PROXY, "https": PROXY}
s.max_redirects = 10                    # fail fast if a real loop remains

r = s.get("https://example.com/", timeout=30)
print(r.status_code, r.url)
for hop in r.history:                   # inspect every redirect hop
    print(hop.status_code, hop.headers.get("Location"))
FAQ

Frequently asked questions

Is ERR_TOO_MANY_REDIRECTS a proxy error or a website error?
Usually it's website configuration — contradictory redirect rules or a stale cookie. But rotating proxies can create loops that don't exist otherwise, because geo-redirect logic reacts to each new exit IP. Test the URL without a proxy or with a sticky session; if the loop disappears, pin the exit IP and country for the whole redirect chain.
How many redirects trigger the error?
Chrome aborts after about 20 redirects and Firefox's limit is 20 as well; curl follows up to 50 with -L, and Python requests defaults to 30. The exact ceiling rarely matters: legitimate chains are two to four hops, so anything that exhausts a limit is looping, and raising the cap only makes it fail slower.
Why does clearing cookies fix ERR_TOO_MANY_REDIRECTS?
Many redirects are conditional on a cookie: no consent cookie means redirect to the consent page, an invalid session means redirect to login. When that cookie is corrupt or references expired server-side state, the condition never resolves and every visit redirects again. Deleting site cookies resets the condition; in scripts, start each job with a fresh cookie jar.
Why do I only get redirect loops when scraping through rotating proxies?
Because each hop in the chain can exit from a different IP and country, and geo-aware sites re-evaluate redirects on every request. Hold one exit for the whole chain with a sticky session (-session-abc123 appended to the ProxyOmega username, held up to 24 hours) and fix the country with -country-us so every hop looks like the same visitor.

Break the loop for good Start routing today.

Sticky sessions and country targeting keep every redirect chain on one consistent exit IP.

ProxyOmega ProxyOmega

90M+ ethically-sourced IPs across 200+ countries and 30,000+ cities. Residential, mobile, ISP and IPv6 proxies for scraping and AI agents.

GDPRCCPA
Product
Premium Unlimited Budget Unlimited Residential / ISP Mobile IPv6 Chrome Extension
Solutions
Web scraping AI agents Price monitoring SERP & SEO Integrations All use cases
Resources
Glossary Error codes Free tools Proxies by platform Locations
Company
About Blog Docs Reseller program Affiliate Contact Sign in
© 2026 ProxyOmega Ltd. All rights reserved.