How to Fix ERR_TOO_MANY_REDIRECTS on a WordPress Site

How to Fix ERR_TOO_MANY_REDIRECTS on a WordPress Site

A practical guide to diagnosing and fixing the ERR_TOO_MANY_REDIRECTS error on WordPress, covering WordPress address settings, HTTPS redirect loops, Cloudflare SSL modes, and plugin conflicts.

ERR_TOO_MANY_REDIRECTS means your website is stuck in a loop: the browser is bounced from one URL to another and back again until it gives up. Your site is effectively down for every visitor, so it needs fixing quickly. The good news is that redirect loops on WordPress have a short list of causes, and you can work through them in order.

First: clear your own cookies

Before changing anything on the server, clear cookies for your domain (or test in a private browsing window and on your phone using mobile data). Occasionally the loop has already been fixed and your browser is replaying a stale redirect. If the error persists in a clean browser, continue below.

Cause 1: Mismatched WordPress and Site Address settings

In Settings โ†’ General, the “WordPress Address (URL)” and “Site Address (URL)” fields must both match the exact form of your live URL – including https:// and the presence or absence of www. If your server redirects visitors to https://www.yourdomain.co.uk but WordPress believes the site lives at http://yourdomain.co.uk, each side keeps “correcting” the other, and you get a loop.

If you cannot log in to change them, set both values temporarily in wp-config.php:

define('WP_HOME', 'https://www.yourdomain.co.uk');
define('WP_SITEURL', 'https://www.yourdomain.co.uk');

Cause 2: HTTPS is terminated in front of your server

This is the most common cause on sites using Cloudflare or another proxy/CDN. The proxy talks to your visitor over HTTPS but fetches the page from your server over HTTP. WordPress sees an HTTP request, redirects to HTTPS, the proxy fetches over HTTP again, and the loop begins.

Two fixes:

  • In Cloudflare: set SSL/TLS mode to Full (strict) rather than “Flexible”. Flexible mode is the classic redirect-loop trigger. Make sure your server has a valid certificate first – see our guide to enabling an SSL certificate.
  • Tell WordPress to trust the proxy header by adding this to wp-config.php above the “stop editing” line:
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
    $_SERVER['HTTPS'] = 'on';
}

If you use Cloudflare in front of your hosting, our note on Cloudflare connecting-IP pass-through is also worth a read so your logs and security plugins see real visitor IPs.

Cause 3: Conflicting redirects in .htaccess or a plugin

Check for duplicate redirect rules doing the same job twice in different places: an HTTPS redirect in .htaccess and one in a plugin (Really Simple SSL, a security plugin, or an SEO plugin’s redirect module), or a www redirect at the hosting level fighting a non-www rule in WordPress. Disable redirect-related plugins one at a time, retest in a private window, and keep exactly one redirect rule per job, ideally at the server level.

Cause 4: A migration that half-changed the URL

Redirect loops often appear straight after moving a site to a new host or switching to HTTPS, when old URLs still lurk in the database. Run a search-and-replace (WP-CLI or a tool such as Better Search Replace) to update any remaining http:// or old-domain references, then flush any page cache. If you are mid-migration, our guide to moving a site to a new host without breaking it covers the safe order of operations.

FAQs about redirect loops

Is ERR_TOO_MANY_REDIRECTS a hosting problem or a WordPress problem?

It can be either, which is why the diagnosis order matters: browser first, WordPress URLs second, proxy/SSL mode third, then plugins and .htaccess. On well-configured hosting the server-level redirects are set once, correctly, which removes most of the common triggers.

My wp-admin is stuck in the loop too – how do I get in?

Use the wp-config.php constants shown above to force the correct URL, or fix the Cloudflare SSL mode; both work without needing to log in.

Can my hosting provider fix this for me?

A good host can see exactly where the loop occurs from the server logs in minutes. Switchweb customers can contact support and we will trace it for you – and if you are migrating to us, redirect rules are checked as part of the switching process.

The short version

One redirect rule per job, WordPress URLs matching your live URL exactly, and Cloudflare on Full (strict). Work through those and the loop will break. If you would rather have hosting where SSL and redirects are configured properly from day one, take a look at our WordPress hosting plans.


Looking to get started on Switchweb? Take a look at our website hosting plans or message us about a free trial.


Pete White

Pete White has worked in the UK web hosting industry for over 20 years, supporting businesses, charities, grassroots campaigns, and non-profit organizations to launch their digital presence with secure, high-performance hosting.

Post Your Comment

SWITCHWEB 7 DAY FREE TRIAL

โ€” No Credit Card Requiredโ€”

7 Day Free Trial
Not ready to commit just yet? That is completely fine. We are confident that once you try Switchweb, you will not want to leave.