Skip to content
Your Tech Read
Your Tech Read
Web & Cloud Hosting

How to Fix “Too Many Redirects” in WordPress After Adding SSL or Cloudflare

In this article 9 sections
  1. The Usual Causes at a Glance
  2. Step 1: Rule Out Your Browser First
  3. Step 2: Change Cloudflare’s SSL Mode to Full (Strict)
  4. Step 3: Make Sure Both WordPress URLs Use HTTPS
  5. Step 4: Tell WordPress It’s on HTTPS Behind Cloudflare
  6. Step 5: Remove Duplicate Redirect Rules
  7. How to Avoid It Next Time
  8. FAQ
  9. Final Word

You’ve just added an SSL certificate or put your site behind Cloudflare, and now your WordPress site won’t load. Instead, the browser shows “This page isn’t working — redirected you too many times” (Chrome) or ERR_TOO_MANY_REDIRECTS. Sometimes you can’t even reach wp-admin.

Don’t worry: your content is safe. This error means two settings are arguing with each other. One says “go to https”, the other says “go back to http”, and the browser bounces between them until it gives up.

After adding SSL or Cloudflare, it’s almost always one of a handful of causes, and the most common one takes 30 seconds to fix. Work through the steps below in order.

Before you change anything, take a backup if you can reach your hosting panel. Our guide to backing up and restoring a WordPress site shows how.

The Usual Causes at a Glance

Cause How common Fix
Cloudflare SSL set to Flexible Most common Change to Full (strict), step 2
WordPress URLs still say http:// Common Update both URLs to https, step 3
WordPress can’t tell it’s on HTTPS behind Cloudflare Common Add a small fix to wp-config.php, step 4
Duplicate redirect rules in .htaccess or plugins Occasional Remove the extra rule, step 5
Old cookies or cache Occasional Clear them, step 1

Step 1: Rule Out Your Browser First

Browsers remember redirects, so the error can stick around even after the real problem is fixed. Before changing anything on the site:

  1. Open your site in a private or incognito window.
  2. If it works there, clear cookies and cached files for your domain in your normal browser.
  3. Try another device or your phone on mobile data.

If the site loads fine in incognito, you’re done. If the error appears everywhere, the problem is on the site or in Cloudflare, so carry on.

If you use a caching plugin or Cloudflare caching, purge the cache after each fix below, or you may still see the old, broken redirect.

Step 2: Change Cloudflare’s SSL Mode to Full (Strict)

If you use Cloudflare, start here. This fixes the problem for most people.

Why it happens

Cloudflare sits between visitors and your server. In Flexible mode, visitors connect to Cloudflare over HTTPS, but Cloudflare connects to your server over plain HTTP. Your server or WordPress then says “this should be HTTPS” and redirects. Cloudflare passes that request back over HTTP again, and the loop starts.

How to fix it

  1. Log in to Cloudflare and select your domain.
  2. Go to SSL/TLS → Overview.
  3. Click Configure (or the encryption mode setting) and choose Full (strict).
  4. Save, wait a minute, then test your site in an incognito window.

Full (strict) needs a valid SSL certificate on your hosting server. Most hosts give a free Let’s Encrypt certificate, so check your hosting panel’s SSL section and switch it on first. If you can’t get one yet, Full works as a short-term fix, but strict is safer.

New to Cloudflare? Our Cloudflare for beginners guide explains each setting.

Step 3: Make Sure Both WordPress URLs Use HTTPS

WordPress stores your site address in two settings. If one says http:// and your server forces https://, they fight.

If you can reach wp-admin

  1. Go to Settings → General.
  2. Check WordPress Address (URL) and Site Address (URL).
  3. Both should start with https:// and match exactly, including www or no www.
  4. Click Save Changes. You’ll be logged out, which is normal. Log back in.

If you can’t reach wp-admin

Set the URLs in wp-config.php instead. Open your hosting File Manager (or use FTP), find wp-config.php in your site’s main folder, and add these two lines just above the line that says /* That’s all, stop editing! */:

define( ‘WP_HOME’, ‘https://yourdomain.com’ );
define( ‘WP_SITEURL’, ‘https://yourdomain.com’ );

Replace yourdomain.com with your real domain, using www. if that’s what your site uses. Save the file and test again.

These lines override the dashboard settings, so the two URL boxes in Settings → General will turn grey. That’s expected.

Step 4: Tell WordPress It’s on HTTPS Behind Cloudflare

Sometimes WordPress can’t see that a visitor arrived over HTTPS, because Cloudflare or a load balancer handled the secure connection before the request reached your server. WordPress thinks the visit is plain HTTP and keeps redirecting.

The fix is a short snippet in wp-config.php. Add it just above the line /* That’s all, stop editing! */, and above any WP_HOME lines you added in step 3:

if ( isset( $_SERVER[‘HTTP_X_FORWARDED_PROTO’] ) && $_SERVER[‘HTTP_X_FORWARDED_PROTO’] === ‘https’ ) {
$_SERVER[‘HTTPS’] = ‘on’;
}

This tells WordPress: “if Cloudflare says the visitor used HTTPS, treat it as HTTPS.” Save the file, purge your cache and test.

Edit wp-config.php carefully. A missing semicolon or bracket can cause a blank page. If that happens, remove what you added. Our guide to the WordPress white screen of death covers that situation too.

Step 5: Remove Duplicate Redirect Rules

If the error is still there, you probably have two tools forcing HTTPS or www in different ways. Check these places one at a time.

Your .htaccess file

In File Manager, open .htaccess in your site’s main folder (you may need to turn on “show hidden files”). Look for extra rules above the # BEGIN WordPress block, such as lines with RewriteRule that mention https or www. Before changing anything, download a copy of the file. Then remove the extra HTTPS or www rule and test again.

If you’re not sure, rename .htaccess to .htaccess-old and go to Settings → Permalinks → Save Changes. WordPress creates a clean default file.

SSL and redirect plugins

Plugins like Really Simple SSL or redirect plugins can clash with Cloudflare’s own HTTPS setting. If you can’t reach wp-admin, rename the plugin’s folder inside wp-content/plugins/ to switch it off, then test.

Cloudflare redirect settings

In Cloudflare, check SSL/TLS → Edge Certificates → Always Use HTTPS and any Redirect Rules or old Page Rules. A rule sending www to non-www while WordPress sends non-www to www creates a loop. Keep one direction everywhere.

Your hosting panel

Some hosts, including Hostinger and other cPanel hosts, have their own “Force HTTPS” switch. If Cloudflare already forces HTTPS, you usually only need one of them.

How to Avoid It Next Time

  • Install SSL on your host first, then switch Cloudflare to Full (strict) before turning on Always Use HTTPS.
  • Pick one place to force HTTPS, either Cloudflare or your host, not both plus a plugin.
  • Decide www or non-www once and use the same choice in WordPress, Cloudflare and your host.
  • Take a backup before changing SSL, DNS or redirect settings.
  • Test in an incognito window after each change, so old cookies don’t fool you.

If you’re setting up Cloudflare or HTTPS for the first time, our guides on domains, hosting and DNS and fixing “Your connection is not private” cover the related errors you might see.

Related guides: WordPress Troubleshooting: How to Fix the Most Common Errors

FAQ

What does “too many redirects” mean in WordPress?

It means your site keeps sending the browser from one address to another in a loop, usually between http and https, or www and non-www. The browser stops after a few tries and shows the error.

Why did it start right after I added Cloudflare?

Most often because Cloudflare’s SSL mode is set to Flexible. Change it to Full (strict) under SSL/TLS → Overview, and install an SSL certificate on your host if you haven’t.

Can I fix it without access to wp-admin?

Yes. You can set the site URLs and the HTTPS fix in wp-config.php through your hosting File Manager, and switch off plugins by renaming their folders.

Will this error hurt my SEO?

If it lasts a short time, no. If Google can’t reach your pages for days, they may drop from search results. Fix it quickly, then check the Pages report in Google Search Console.

Is Full or Full (strict) better?

Full (strict) is better because it checks that your server’s certificate is valid. Use Full only temporarily while you set up a certificate on your host.

I fixed it but still see the error. Why?

Your browser or cache is probably remembering the old redirect. Clear your cookies, purge Cloudflare’s cache and any caching plugin, then test in an incognito window.

Final Word

“Too many redirects” looks scary, but it’s almost always a settings mismatch, not a broken site. Start with the quickest checks: an incognito window, then Cloudflare’s SSL mode set to Full (strict). Those two fix most cases. If it’s still stuck, line up your WordPress URLs, add the HTTPS fix to wp-config.php, and remove any duplicate redirect rules.

Once your site loads again, purge every cache and test a few pages. Then take a fresh backup, so the next change starts from a working site.

Leave a comment

Your email address will not be published. Required fields are marked *