How to Fix Too Many Redirects Error
WordPress Troubleshooting & Fixes
How to Fix “Too Many Redirects” Error in WordPress
The “Too Many Redirects” error appears when your website enters an infinite redirect loop. This usually happens due to incorrect HTTPS settings, wrong WordPress URLs, conflicting redirect plugins, Cloudflare settings, or misconfigured .htaccess rules. This guide helps you fix it instantly.
1
What Causes the “Too Many Redirects” Error?
Your site keeps redirecting between HTTP, HTTPS, www, or a forced redirect.
Common causes include:
- Incorrect HTTPS settings
- Wrong WordPress URL & Site URL
- Cloudflare SSL set incorrectly
- Redirect loops created by plugins
- Bad .htaccess rewrite rules
- Multiple redirect rules from hosting + plugins
- www vs non-www conflicts
Let’s fix each one step-by-step.
2
Step 1: Fix WordPress URL & Site URL
Most redirect loops happen because URLs don’t match.
If you can’t access wp-admin, fix URLs in wp-config.php:
define('WP_HOME', 'https://yourdomain.com');
define('WP_SITEURL', 'https://yourdomain.com');
Ensure consistency:
- Use HTTPS, not HTTP
- Match www OR non-www (not both)
- No extra slashes or subfolder errors
Incorrect URL settings can send your site into a redirect loop.
3
Step 2: Disable All Redirect & Security Plugins
Plugins often create multiple conflicting redirects.
Disable these types of plugins:
- Redirection plugins
- Force SSL/HTTPS plugins
- Security plugins (AIOS, Wordfence, iThemes)
- Cache plugins
- Migration/clone plugins
If locked out of wp-admin:
- Go to /wp-content/
- Rename plugins → plugins-old
- Try loading your site again
If the site loads → a plugin caused the redirect loop.
4
Step 3: Fix Cloudflare SSL Settings
Wrong Cloudflare SSL mode = immediate redirect loop.
Go to Cloudflare → SSL/TLS
Change SSL mode to:
- Flexible → ❌ Never use (causes redirect loop ALWAYS)
- Full → 👍 Recommended
- Full (Strict) → Best, if your hosting has valid SSL
Also disable:
- Automatic HTTPS Rewrites
- Always Use HTTPS (temporarily)
- HSTS (if enabled)
Cloudflare + WordPress both forcing HTTPS = 10 redirects instantly.
5
Step 4: Check .htaccess for Conflicting Rules
Duplicate redirects here cause infinite loops.
Regenerate a fresh .htaccess:
- Rename .htaccess → .htaccess-old
- Go to Settings → Permalinks
- Click Save Changes
WordPress will generate a clean .htaccess file.
Correct default rules:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
If you see “Force HTTPS” rules, temporarily remove them.
6
Step 5: Turn OFF HTTPS Redirects From Hosting Panel
If your hosting forces HTTPS + your plugins force HTTPS → loop.
Check hosting features:
- Force HTTPS Redirect
- HSTS
- SSL redirect
- Auto HTTP-to-HTTPS
Turn these OFF temporarily to test.
Only ONE place should force HTTPS → Hosting OR Cloudflare OR .htaccess OR plugin (choose one).
7
Step 6: Fix www vs non-www Conflicts
A major cause of redirect loops.
If your site loads as:
- https://www.yourdomain.com
but WordPress URL is:
- https://yourdomain.com
WordPress will keep redirecting between www and non-www endlessly.
To fix:
- Choose one version (www or non-www)
- Make it consistent everywhere:
- WordPress URL
- Site URL
- .htaccess
- Cloudflare DNS
- Hosting settings
8
Step 7: Clear Cache (WordPress / CDN / Browser)
Old redirects may remain cached.
- Clear WordPress caching plugin
- Clear Cloudflare cache
- Clear hosting cache (LiteSpeed / NGINX)
- Clear browser cache
Try loading your site in an incognito window.
9
Step 8: Disable Redirects in wp-config.php
Plugins sometimes insert bad redirect rules into wp-config.php.
Open wp-config.php and check for:
redirect( ... );
wp_redirect( ... );
header("Location: ...");
Remove any suspicious redirect code.
10
Step 9: Fix WordPress Hacked Redirects (If applicable)
Malware often causes random redirects.
Look for malware:
- Redirects to spam websites
- Hidden JavaScript in footer
- Unknown .htaccess rules
- Strange PHP files in /wp-content/
Scan using:
- Wordfence
- MalCare
Want a Redirect-Free WordPress Setup?
All SiteCrafted websites include properly configured HTTPS, .htaccess, Cloudflare settings, and security rules to ensure your site never faces redirect loops again.









