All posts
Guides··8 min read

Website says 'redirected you too many times'? Why it loops, and the fix

Your own website suddenly shows 'redirected you too many times', ERR_TOO_MANY_REDIRECTS or 'The page isn't redirecting properly', usually right after switching on SSL, adding Cloudflare, changing your WordPress address or adding a redirect. Here is how to tell a browser problem from a site problem, and the fix for each cause in Cloudflare's, WordPress's and Google's own wording.

OneSol Team

A blue shop door is surrounded by wooden arrows forming a loop, with a brass key outside on a bright orange backdrop.

On Sunday evening you switch on the free SSL certificate your host offers, and while you're at it you put the salon's domain behind Cloudflare because a friend said it makes the site faster. On Monday at 8am a client messages: the booking page won't open. Chrome says 'This page isn't working' and that your site 'redirected you too many times', with ERR_TOO_MANY_REDIRECTS underneath. Firefox calls it 'The page isn't redirecting properly'. On your phone, Safari says it can't open the page because too many redirects occurred. You clear your cookies, as the error suggests. Nothing changes.

A redirect is a server saying 'not here, go to this address instead'. A loop is two settings giving opposite directions: one sends the browser to https and another sends it back to http, or one sends www to the bare domain and another sends it back. The browser follows the hops for a while, then stops and shows this error. Your pages, photos and bookings are all still there. In almost every case the loop started with the last setting you changed, and the fix is to make one of the two settings stand down.

OneSol Max is a done-for-you website for $1 the first month, then $29 a month: our team builds the site with you and connects your own domain with HTTPS switched on, while the domain stays registered with your own registrar.See OneSol Max →

The quick answer: what is looping, and the fix

Start with the last thing you changed. In short:

  • Only your browser loops, and the site opens in an Incognito window or on someone else's phone: old cookies. Delete that site's cookies. See the first section.
  • It started when you put the site behind Cloudflare, and the SSL/TLS mode is 'Flexible': your host forces HTTPS while Cloudflare keeps asking over HTTP. Switch to 'Full' or 'Full (strict)'. See cause 1.
  • It started after you turned on 'Always Use HTTPS', HSTS or 'Full' mode: something at your host sends HTTPS back to HTTP. Remove that redirect. See cause 2.
  • It started after you added a redirect for www, a new domain or a redirect plugin: two rules point at each other. Delete one. See cause 3.
  • It started after you changed 'WordPress Address (URL)' or 'Site Address (URL)', or moved the site: set the right address in wp-config.php. See cause 4.

First, rule out your own browser

Google's Chrome help lists this error under 'This webpage has a redirect loop' and says you can get it 'when the page has tried to redirect you too many times'. Its advice is that 'Sometimes, pages won't open because cookies aren't working correctly', so try deleting your cookies. You only need to delete them for your own site:

  • In Chrome, select 'More' at the top right, then 'Settings'.
  • Select 'Privacy and security', then 'Third-party cookies', then 'See all site data and permissions'.
  • Search for your site's name, select the delete icon to the right of it, and confirm. This signs you out of your own site, so have your password ready.
  • Now open the site in an Incognito window, which Chrome's help suggests for any loading problem, and on a phone using mobile data instead of your Wi-Fi.

If the site opens, the problem was your browser and you're done. If it loops in Incognito too, the loop is on the website and every customer is seeing it. Deleting cookies won't help them, so keep reading. In Safari or Firefox, the equivalent first step is removing that one site's data in the browser's privacy settings.

Cause 1: Cloudflare is set to 'Flexible' and your host forces HTTPS

This is the most common loop after moving a site to Cloudflare, and Cloudflare's own troubleshooting page for ERR_TOO_MANY_REDIRECTS covers it first. In 'Flexible' mode, visitors reach Cloudflare over HTTPS, but Cloudflare 'sends unencrypted requests to your origin server over HTTP' (your origin is your web host). If your host redirects every HTTP request to HTTPS, it answers Cloudflare with a redirect, the browser asks again, and Cloudflare asks your host over HTTP again. Cloudflare's page on Flexible mode says it plainly: 'If your origin forces HTTPS by automatically redirecting HTTP requests to HTTPS, do not use Flexible mode.'

That redirect at your host can come from a force-HTTPS switch in your hosting panel, a rule in the server's configuration, an SSL plugin, or WordPress's FORCE_SSL_ADMIN setting. WordPress's HTTPS documentation warns that when a site sits behind a proxy that provides SSL but is hosted itself without SSL, that setting will 'send any requests into an infinite redirect loop'. The fix, from Cloudflare's docs:

  • In the Cloudflare dashboard, go to the 'SSL/TLS Overview' page and choose an encryption mode. If your domain is on Automatic SSL/TLS, pick the custom option to set the mode yourself.
  • Choose 'Full (strict)' if your host has a valid certificate for your domain, or 'Full' if it only has a self-signed one. Both need a certificate on your host, and Cloudflare strongly recommends one of these two modes where possible.
  • If your host really can't serve HTTPS, keep 'Flexible' but remove the HTTPS redirect at your host, then let Cloudflare do the redirecting: on the 'Edge Certificates' page, turn on 'Always Use HTTPS'. Cloudflare recommends not performing redirects at your origin web server, as this can cause redirect loop errors.
  • Not sure whether your host is redirecting? Cloudflare's own advice is to contact your hosting provider or site administrator.

Cause 2: Something at your host sends HTTPS back to HTTP

This is the opposite loop. In 'Full' and 'Full (strict)' mode, Cloudflare connects to your host over HTTPS, and Cloudflare says loops 'will occur if your origin server automatically redirects all HTTPS requests to HTTP'. Two edge settings cause the same clash. 'Always Use HTTPS' redirects all http requests to https for every subdomain and host on your domain, and HSTS makes browsers switch your links to https by themselves. If your host sends those visitors back to http, they bounce between the two. Look for an old rule written before the site had a certificate, or a plugin or setting still pointing at http://.

  • Remove the HTTPS-to-HTTP redirect at your host. This is Cloudflare's fix for all three settings.
  • Or disable 'Always Use HTTPS', which sits on the 'Edge Certificates' page.
  • If you turned on HSTS, Cloudflare's fix is to remove those origin redirects and make sure the encryption mode is 'Flexible' or higher, not 'Off', or to disable HSTS.
  • Be careful backing out of HSTS. Cloudflare warns that if you stop serving HTTPS, your site 'becomes inaccessible to visitors for the duration of the Max Age Header'. To turn it off, set the 'Max Age Header' to '0 (Disable)' on the 'Edge Certificates' page, and keep HTTPS running until the original Max Age has passed.

Cause 3: Two redirect rules send visitors round in a circle

From Cloudflare's troubleshooting page: 'Redirect loops can also occur if you have conflicting URL redirects.' Its example is one address redirecting to a second address, which redirects back to the first. For a small business it usually looks like one of these:

  • One place sends yourshop.com to www.yourshop.com, and another place sends www back to yourshop.com.
  • After a domain move, the old domain forwards to the new one, while a leftover rule or setting on the new one still points to the old.
  • A redirect plugin has a rule whose target is the same page as its source, or two rules that point at each other.

The fix is to find every place a redirect can live and make sure each address is redirected by only one of them:

  • In Cloudflare, open the 'Rules Overview' page and read each redirect rule, then check the 'Page Rules' page for any rule using 'Forwarding URL'. Cloudflare's advice is to review your redirect rules and Page Rules so that none conflict with each other.
  • Check the redirect settings in your hosting panel and the rule list in any WordPress redirect plugin.
  • Give each redirect one owner, ideally one place for all of them, and delete the duplicate.
  • If the loop locks you out of wp-admin, WordPress's documentation suggests temporarily renaming your plugins folder to rule out a plugin. You can do that in your host's file manager or over FTP. If the site then opens, rename the folder back and switch plugins on one at a time to find the one that loops.

Cause 4: WordPress's addresses were changed or don't match

Under 'Settings', 'General', WordPress has two fields: 'WordPress Address (URL)', where WordPress's files live, and 'Site Address (URL)', the address people type to reach your site. Switch one to https:// before your certificate works, mistype it, or move to a new domain, and you can lock yourself out with a loop. WordPress's own troubleshooting page says too many redirects is often caused by conflicting site URL, HTTPS or proxy settings, and tells you to check for:

  • Conflicting WP_HOME and WP_SITEURL values in wp-config.php.
  • Wrong siteurl and home values in the database options table.
  • Mixed http:// and https:// addresses left in the database after moving to SSL.
  • Conflicting SSL or redirect settings in a CDN, DNS proxy, web host proxy, Nginx or Apache. That is causes 1 to 3 above.

Since you can't reach the settings screen, set the addresses in wp-config.php instead. It sits in the main folder of your WordPress install, which you can open with your host's file manager or FTP:

  • Download a copy of wp-config.php first, so you can put the original back.
  • Add these two lines above the comment near the bottom that says to stop editing, with your real address in place of example.com: define( 'WP_HOME', 'https://example.com' ); and define( 'WP_SITEURL', 'https://example.com' );
  • Use https:// only if your certificate already works, use the same www or non-www form your redirects use, and don't put a slash at the end.
  • Save and reload the site. While these lines are there, the two fields under 'Settings', 'General' show these values and can't be changed from the dashboard.

WordPress's docs call this hard-coding, 'not necessarily the best fix'. The lines override the stored addresses but don't change the database, so if you ever remove them, the old value comes back. To fix the stored values for good, correct siteurl and home in the wp_options table with phpMyAdmin after a backup, or use the functions.php method in WordPress's guide to changing the site URL, then remove that code again. WordPress also has a RELOCATE constant, but warns that leaving it in wp-config.php is insecure.

If the site moved between domains or from HTTP to HTTPS, WordPress says to back up and run a database search-replace, so old addresses inside pages and settings are updated too. WP-CLI's wp search-replace command has a --dry-run option that shows what would change before anything is written.

When fixing the plumbing stops being worth it

One loop is a settings problem, and the steps above fix it. It isn't a reason to change platforms. But if every change to SSL, Cloudflare or a plugin breaks the site again, and nobody remembers who set half of it up, you're paying for the website with your Monday mornings.

OneSol Max is a done-for-you alternative: $1 for the first month, then $29 a month or $295.80 a year. Our team builds a multi-page site with you: you describe the business, Sol AI drafts the pages and copy, and a developer assigned to your account builds the design. You add the DNS record we show, or we do it with you, HTTPS is switched on, and the domain stays registered with your own registrar. The limits: there's no one-click import from WordPress, Wix or Squarespace, so your content is rebuilt with you; you get less pixel-by-pixel design control than in Wix or Squarespace; and there's no promised turnaround time.

Tired of untangling SSL and redirect settings?OneSol Max is a done-for-you website for $1 the first month, then $29 a month: our team builds the site with you and connects your own domain with HTTPS switched on, while the domain stays registered with your own registrar.See OneSol Max →

Still stuck? More fixes

Frequently asked questions

What does 'redirected you too many times' mean?

It means the browser was sent from one address to another so many times that it gave up. Usually two settings disagree: one sends visitors to https and another sends them back to http, or one sends the bare domain to www and another sends www back. Google's Chrome help lists the error as ERR_TOO_MANY_REDIRECTS and suggests deleting your cookies first. If the site still loops in an Incognito window, the problem is on the website, not in your browser, and the fix is to find the two conflicting redirects and remove one.

Why did my site start saying too many redirects after I added Cloudflare?

Most often because Cloudflare's SSL/TLS encryption mode is 'Flexible' while your web host forces HTTPS. In Flexible mode Cloudflare connects to your host over plain HTTP, your host redirects that request to HTTPS, and the cycle repeats. Cloudflare's docs say not to use Flexible if your origin forces HTTPS. On the 'SSL/TLS Overview' page, switch to 'Full' or 'Full (strict)', which need a certificate on your host. Or remove the redirect at your host and turn on 'Always Use HTTPS' on the 'Edge Certificates' page, so Cloudflare does the redirecting instead.

Will clearing cookies fix ERR_TOO_MANY_REDIRECTS?

Only if the loop is in your own browser. Chrome's help says pages sometimes won't open because cookies aren't working correctly, so deleting the cookies for that one site is a sensible first step. Then open the site in an Incognito window, or on a phone using mobile data. If it loads there, you're done. If it still loops, every visitor is seeing it, and the cause is a setting on the site, such as Cloudflare's SSL mode, a redirect rule or WordPress's site address, which cookies can't fix.

How do I fix too many redirects in WordPress when I can't log in?

Open wp-config.php with your host's file manager or FTP and add define( 'WP_HOME', 'https://example.com' ); and define( 'WP_SITEURL', 'https://example.com' ); with your real address and no slash at the end. WordPress's docs suggest this while troubleshooting. It overrides the stored addresses without changing the database, and the fields under 'Settings', 'General' lock while the lines are there. If it still loops, WordPress suggests temporarily renaming the plugins folder to rule out a plugin, and checking your CDN or host for conflicting SSL or redirect settings.

Why does my WordPress login page keep reloading or redirecting?

WordPress's documentation lists four checks for a login page that keeps reloading after you enter your details. Clear your browser's cookies for the site. Check wp-config.php for correct WP_HOME and WP_SITEURL values. Check the siteurl and home values in the database options table, for example in phpMyAdmin. Then temporarily rename your plugins folder to rule out a plugin conflict. If the site sits behind Cloudflare or another proxy that provides SSL, check its encryption mode too, because WordPress warns that FORCE_SSL_ADMIN can cause an infinite redirect loop in that setup.

Should I use Flexible, Full or Full (strict) in Cloudflare?

Cloudflare strongly recommends 'Full' or 'Full (strict)' where possible. 'Full' connects to your host over HTTPS when the visitor does, but doesn't validate your host's certificate, so a self-signed one works. 'Full (strict)' works the same way and also checks the certificate, which can come from a public certificate authority or Cloudflare's Origin CA. 'Flexible' sends traffic from Cloudflare to your host unencrypted, and Cloudflare says to choose it only when your host can't have a certificate. Never pair 'Flexible' with a host that forces HTTPS: that combination is a redirect loop.

Written by

OneSol Team

Michael Carter writes the OneSol blog, which covers the problems small businesses and creators run into when they sell online: a link that has to hold everything, a checkout that pays the seller directly, a form that people actually finish.

Run all of this from one link.

Free to start — no card required.