How to Fix Too Many Redirects in WordPress

Break a WordPress redirect loop by aligning your site URLs, SSL settings, and any redirect rules in .htaccess.

· Updated · 2,895 views

"This page is not working: redirected you too many times" means WordPress is bouncing the browser between URLs endlessly. The cause is almost always a mismatch between your site URLs, SSL settings, or redirect rules.

Align Your Site URLs

A common trigger is one URL set to www or https and another set to non-www or http. Force both to match in wp-config.php:

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

Choose one consistent format and use it in both lines.

Check SSL and Plugin Redirects

  1. If you use an SSL or HTTPS-forcing plugin, deactivate it temporarily to see if the loop stops.
  2. Confirm AutoSSL has issued a valid certificate in cPanel; an HTTPS redirect with no certificate causes loops.
  3. Review caching plugins, which can cache an old redirect; clear the cache.

Review the .htaccess File

Look for conflicting redirect rules. A clean HTTPS redirect looks like this:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://yourdomain.co.ke/$1 [R=301,L]

Make sure you do not also have a rule redirecting back to HTTP, since two opposing rules create the loop. After editing, reset Permalinks under Settings > Permalinks to rebuild the file cleanly.

Clear your browser cookies for the site, as stored redirects can keep the loop alive even after the fix.

Was this article helpful?

Your feedback helps us improve our documentation.

Still Need Help?

Our support team is available 24/7 to assist you.