WordPress Redirect Loops Explained: Common Causes and How to Fix Them

WordPress Redirect Loops Explained: Common Causes and How to Fix Them

Fix the redirect source first, then clear every cache. A WordPress redirect loop means the browser is sent from one URL to another, then back again, until it stops and shows an error such as ERR_TOO_MANY_REDIRECTS. The usual cause is not “WordPress being broken.” It is a conflict between SSL settings, site URLs, plugins, server rules, CDN settings, or cached redirects.

TLDR: A WordPress redirect loop usually happens when two systems disagree about the correct version of your site, such as http versus https, or www versus non-www. For example, a WooCommerce store might force HTTPS in WordPress while Cloudflare is set to Flexible SSL, sending visitors in circles. In one real support pattern, a 14-hop redirect chain can add 5–10 seconds before the browser fails, which is enough to wipe out paid traffic sessions. Start by checking SSL, WordPress Address settings, plugins, and .htaccess, in that order.

What a WordPress Redirect Loop Really Is

A redirect loop is a repeated instruction. Your visitor requests example.com. The server says, “Go to www.example.com.” Another rule says, “No, go back to example.com.” The browser obeys until it hits its safety limit.

The error is visible to users, search engines, uptime monitors, and payment callbacks. That makes it serious. It is not just a cosmetic bug. If your checkout, login page, or admin area is caught in the loop, revenue and operations stop fast.

Common Causes of WordPress Redirect Loops

1. HTTP and HTTPS Settings Do Not Match

This is the most common cause. WordPress may think the site is using https://, while the server or CDN sends requests through http://. The result is a tug of war.

Check these areas:

  • Settings > General in WordPress.
  • WordPress Address (URL).
  • Site Address (URL).
  • Your hosting SSL settings.
  • Your CDN SSL mode, especially if using Cloudflare.

If your site should use HTTPS, both WordPress URLs should normally start with https://. Your server should also have a valid SSL certificate installed.

2. Cloudflare Flexible SSL Conflicts

The catch is that Cloudflare’s Flexible SSL mode can look safe while causing trouble. In that mode, visitors connect to Cloudflare over HTTPS, but Cloudflare may connect to your origin server over HTTP. WordPress sees HTTP and tries to force HTTPS. Cloudflare repeats the request. Around it goes.

For most WordPress sites, use Full or Full (strict) SSL instead, with a valid certificate on the hosting server. Cloudflare documents the difference between these SSL modes.

3. WordPress Address and Site Address Are Wrong

One small typo can break the whole site. A bad domain, old staging URL, wrong protocol, or mixed www setting can trigger a loop.

If you can access the dashboard, go to Settings > General and correct both URL fields. If you cannot access the dashboard, add these lines to wp-config.php:

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

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

Replace the domain with your real domain. Use either www or non-www, not both.

4. Redirect Plugins Are Fighting Each Other

SEO plugins, SSL plugins, membership plugins, security plugins, and redirect managers can all create redirect rules. Honestly, it feels like every plugin wants to “help” by adding one more rule. Then two rules clash, and the site falls over.

Disable redirect-related plugins first. If the loop stops, reactivate them one by one. Watch for plugins that force:

  • HTTPS redirects.
  • WWW or non-WWW redirects.
  • Login page redirects.
  • Language or country redirects.
  • Old domain redirects after migration.

5. Bad .htaccess Rules

Apache servers use the .htaccess file for rewrite and redirect rules. A copied snippet from an old site can cause a loop in seconds.

To test it safely:

  1. Connect by FTP, SFTP, or your hosting file manager.
  2. Find .htaccess in the WordPress root folder.
  3. Rename it to .htaccess-old.
  4. Try loading the site again.
  5. If the site works, go to Settings > Permalinks and click Save Changes.

This creates a fresh WordPress rewrite file. Do not delete the old file until you review it.

6. Cache Is Serving an Old Redirect

Caching can make a fixed problem appear broken. Expect to waste time on this if you skip cache clearing. A redirect may be stored in your browser, WordPress cache plugin, page cache, object cache, server cache, or CDN.

Clear caches in this order:

  1. Browser cache, or test in a private window.
  2. WordPress caching plugin.
  3. Hosting cache.
  4. CDN cache.
  5. Object cache, such as Redis or Memcached.

Also test with another device or mobile network. This helps confirm whether the loop is global or only stored locally.

How to Diagnose the Loop Without Guessing

Use a redirect checker or run a header test from the command line: curl -I -L https://example.com

This shows each redirect step. You are looking for repeated patterns, such as:

  • http://example.com to https://example.com.
  • https://example.com back to http://example.com.
  • non-www to www and back again.
  • /wp-admin to a login page and back again.

If admin access is blocked, disable plugins by renaming the plugins folder to plugins-off. If the site loads, restore the folder name and disable plugins one at a time. This is plain, careful troubleshooting. It beats random clicking.

Safe Step-by-Step Fix Plan

  1. Back up the site. Include files and the database.
  2. Confirm the intended URL. Pick one final version, such as https://www.example.com.
  3. Fix WordPress URLs. Match WP_HOME and WP_SITEURL.
  4. Check SSL. Make sure the server has a valid certificate.
  5. Review CDN settings. Avoid Flexible SSL when WordPress forces HTTPS.
  6. Disable redirect plugins. Turn them back on one at a time.
  7. Reset .htaccess. Regenerate it through permalink settings.
  8. Clear all caches. Browser, plugin, host, and CDN.
  9. Test headers. Confirm there is one clean redirect, not a cycle.

Special Case: Redirect Loop in wp-admin

A loop in /wp-admin often points to cookie, HTTPS, or login redirect issues. First, clear cookies for the domain. Then check whether SSL is forced only on admin pages. Old constants in wp-config.php can also cause trouble.

Look for lines like this:

define(‘FORCE_SSL_ADMIN’, true);

This setting is normal on HTTPS sites. It becomes a problem when the server does not pass HTTPS status correctly to WordPress. Sites behind a proxy may need correct forwarded headers from the host or CDN.

How to Prevent Redirect Loops After Fixing One

Keep redirects simple. One canonical domain. One SSL policy. One redirect plugin, if any. Document every manual server rule. After migrations, remove temporary redirects that are no longer needed.

Also monitor the site after changes. Test the homepage, login page, checkout, sitemap, and one old URL. A redirect loop can hide in a single section while the rest of the site looks fine.

The reliable fix is methodical: identify the repeated redirect, remove the conflicting rule, then clear the cached result. Do not stack more redirect rules on top of a broken setup. That usually makes the loop harder to trace and slower to repair.