How to Fix “Too Many Redirects” in WordPress

To fix too many redirects in WordPress, clear stale browser data, correct conflicting site URLs, and remove competing HTTPS redirects. ERR_TOO_MANY_REDIRECTS means your browser is stuck following redirects until it gives up.

You can usually narrow down the cause without changing server files. Start with the browser checks below, then follow the dashboard or file-access instructions depending on whether you can log in.

Key Takeaways

  • Test in a private window before changing WordPress, because cached redirects can hide a successful fix.
  • Keep your site URLs consistent and use one HTTPS redirect system.
  • Back up your configuration files and database before editing, then change one thing at a time.

Identify Where the Redirect Loop Starts

A redirect loop happens when conflicting rules repeatedly send requests between addresses. For example, one layer forces HTTPS while another sends the request back to HTTP.

A server rack with a network switch connected to glowing blue fiber optic cables.

Your symptoms help you choose the next test.

Symptom Start here
Works in a private window Browser cache and cookies
Alternates between HTTP and HTTPS SSL, CDN, and proxy settings
Alternates between www and non-www WordPress URLs and hostname redirects
Only certain pages fail Page-specific redirect rules
Started after activating a plugin Plugin isolation

Use a redirect checker such as httpstatus.io or the Redirect Path browser extension to inspect the redirect chain. Look for repeated addresses and changes in protocol, hostname, or path.

Also test your homepage, an affected post, and /wp-admin/. A site-wide failure points toward shared configuration; one looping page usually points toward a narrower rule.

Start With Browser Cookies and Cached Redirects

First, use the listed shortcut to force page refresh. On Windows and Linux, press Ctrl+F5. In Chrome or Firefox on Mac, use Cmd+Shift+R. In Safari, hold Shift and click Reload.

Next, open a fresh private window in incognito mode. If the page works there, clear browser cache and clear browser cookies for the affected domain. Clearing cookies signs you out.

If another browser also fails, continue troubleshooting the site. Repeatedly clearing browser data won’t repair an active server-side loop.

Browser redirect caching can make a working fix look unsuccessful. After each change, repeat the test in incognito mode and compare it with the original browser session.

Flush all caches, including WordPress, hosting server, and CDN caches. You can usually purge hosting and CDN caches from their separate control panels, even when WordPress won’t open.

If wp-admin Works: Check URLs and Plugins

Take a files-and-database backup before making changes. If possible, test plugin changes on staging because deactivation can interrupt checkout, forms, or memberships.

Match Your WordPress URL Settings

Open Settings > General. For a standard installation at your domain root, WordPress Address (URL) and Site Address (URL) should contain the same HTTPS address.

Check both the protocol and hostname. Mixing http with https, or www with non-www, can create a loop when another layer redirects in the opposite direction.

Choose the address your site should use, save it, and sign in again if prompted. Don’t remove www simply because a tutorial uses a non-www domain.

If the fields are locked, configuration constants probably control them. Follow the file-access instructions below.

Isolate Redirect-Producing Plugins

Start with whichever plugin you installed or changed before the error appeared. Redirect managers, SSL helpers, security plugins, and caching plugins are common places to investigate.

Deactivate the suspected plugin first, clear caches, and repeat the failing request. If necessary, deactivate plugins one at a time, clearing caches and retesting after each change. You can also deactivate all ordinary plugins temporarily, then reactivate them individually.

When the error returns, disable that plugin again to confirm the connection. Our guide to troubleshooting WordPress plugin conflicts covers safer isolation methods.

Also review individual redirect rules. Two rules that send addresses back to each other will loop even when the plugin itself works correctly.

If wp-admin Is Blocked: Recover Through Your Files

Try /wp-login.php directly before editing files. If that also loops, use your hosting File Manager or an FTP client to connect through SFTP, which is safer than unencrypted FTP.

Use an FTP client to download backups of wp-config.php and .htaccess, then export your database through your hosting panel. Keep backups outside publicly accessible folders.

A laptop and an external drive on a wooden desk with a warm lamp.

Set the Site URLs in wp-config.php

Find wp-config.php in your WordPress installation directory. Before the line that loads wp-settings.php, add:

define('WP_HOME', 'https://example.com');
define('WP_SITEURL', 'https://example.com');

Replace example.com with your domain, including www if that’s your chosen hostname. Don’t add a trailing slash. Edit existing definitions rather than adding duplicates.

These WordPress URL constants override the database URL settings. Our wp-config.php guide explains how to edit the file safely.

Disable Plugins Without Logging In

Rename the plugins folder to plugins-disabled, then reload the site.

If access returns, visit the dashboard’s Plugins screen while the folder remains renamed so WordPress records the missing plugins as inactive. Restore the folder name to plugins, then reactivate plugins individually and retest.

This doesn’t delete plugin data. However, it doesn’t disable must-use plugins in wp-content/mu-plugins or hosting-level redirects.

Resolve HTTPS, Cloudflare, and Proxy Conflicts

If the error started after enabling SSL or moving behind a CDN, inspect the connection between your browser, proxy, and origin server.

Replace Cloudflare Flexible Mode

Cloudflare’s Flexible mode, also called flexible SSL, encrypts traffic between visitors and Cloudflare but uses HTTP between Cloudflare and your origin. If WordPress or your server forces HTTPS, move away from flexible SSL to prevent a redirect loop.

In Cloudflare, open your domain’s SSL/TLS > Overview settings. Switch to Full, or preferably Full (strict) if your origin has a valid, matching SSL certificate.

Install an appropriate origin certificate before using strict mode. Also remove opposing HTTPS-to-HTTP redirects.

Keep one system responsible for enforcing HTTPS. Stacking host, CDN, and plugin redirects makes conflicts harder to diagnose.

Help WordPress Recognize Forwarded HTTPS

With reverse proxy HTTPS, WordPress can misread HTTPS requests behind Cloudflare, AWS ELB, or another reverse proxy when the proxy connects internally over HTTP.

If your trusted proxy sends X-Forwarded-Proto: https, add this before WordPress loads in wp-config.php:

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

Trust this header only when your proxy controls it. Your origin should reject direct bypass traffic or discard untrusted forwarded headers.

On NGINX/PHP-FPM setups, the server may instead need to pass the correct HTTPS information through FastCGI. This snippet won’t repair a redirect that happens before PHP runs.

Repair Apache .htaccess or NGINX Rules

Move to server rules after you’ve tested browser data, URLs, plugins, and HTTPS settings.

Reset Apache’s WordPress Rules

Apache uses .htaccess, usually in the site root beside wp-config.php. Enable Show hidden files in your file manager.

Download a backup, rename the original to .htaccess-disabled, and create a new .htaccess containing these standard root-level, single-site rules:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Retest immediately. If the loop disappears, the original file contained a conflicting rule, such as a 301 redirect to a different destination. Restore required security directives carefully, but leave that redirect disabled.

Saving Settings > Permalinks > Save Changes also regenerates WordPress rules when writable. Keep custom directives outside the WordPress markers. Our WordPress .htaccess guide covers additional configurations.

Inspect NGINX Separately

NGINX doesn’t read .htaccess. Its configuration commonly starts at /etc/nginx/nginx.conf and includes files under conf.d/ or sites-enabled/.

Inspect the NGINX configuration for the affected server block. Check for return 301, rewrite ... permanent, and conditions such as if ($scheme = http). Compare their destinations with your CDN and WordPress settings.

A proxy can make the origin’s $scheme remain http even when visitors use HTTPS. Fix that protocol handling instead of adding another redirect.

Run nginx -t before reloading NGINX. On managed hosting, ask support to repair server-level rules if you lack access.

Confirm the Live Site Is Fixed

After correcting the cause, flush all caches, including WordPress, server, and CDN caches. Clear generated CSS and JavaScript caches if your optimization plugin uses them.

In a fresh private window, test your homepage using HTTP, HTTPS, www, and non-www. Each supported variant should reach your chosen HTTPS address without cycling. The final page should return 200 OK, although preceding redirects can return 301 or 302.

Open browser developer tools, select Network, and enable Disable cache while the tools remain open. Repeat the original failure, then test login, a post, and important forms or checkout flows.

Also check the Console for mixed content warnings. Our guide to fixing WordPress mixed content covers remaining HTTP resource references.

Search engines can’t crawl page content behind a loop. Prolonged failures waste crawl requests and can cause ranking loss or removal from the index.

Frequently Asked Questions

Why Does Safari Say Too Many Redirects Occurred?

Safari stops when requests keep redirecting. Clear the affected site’s website data, then test privately. If other browsers fail too, investigate the site’s redirect rules.

How Many Redirects Are Too Many?

Browser limits vary. Focus on eliminating repeated destinations rather than staying below a limit. A short chain that reaches a working page differs from an endless loop.

What If Only a Subdomain or Subdirectory Loops?

Inspect that hostname’s certificate, CDN settings, and server block. Don’t automatically copy root-domain settings. In subdirectory and proxy installations, WordPress Address and Site Address can legitimately use different paths.

Keep the Fix Reversible

The fastest reliable fix comes from isolating one cause at a time. Start with browser data, then investigate URLs, plugins, HTTPS handling, and server rules.

Keep your backups until the original failing request and important site functions work again. A clean redirect chain should end at your intended HTTPS page without repeating a destination.

Picture of Andy Feliciotti

Andy Feliciotti

Andy has been a full time WordPress developer for over 15 years. Through his years of experience has built 100s of sites and learned plenty of tricks along the way. Found this article helpful? Buy Me A Coffee

Leave a Reply

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

WordPress Tips Monthly
Get the latest from SmartWP to your inbox.