How to Fix WordPress “Too Many Redirects”
The “Too Many Redirects” error in WordPress occurs when a website gets caught in a redirect loop. Instead of loading the requested page, the browser is repeatedly sent from one URL to another until it stops and displays an error.
Depending on the browser, you may see messages such as:
- ERR_TOO_MANY_REDIRECTS
- This page isn’t working
- The page isn’t redirecting properly
- Too many redirects
This problem can prevent visitors from accessing the website and may also affect WordPress administration.
The good news is that redirect loops are usually caused by configuration problems and can often be fixed without reinstalling WordPress.
What Causes Too Many Redirects in WordPress?
Common causes include:
- Incorrect WordPress URL settings
- HTTP and HTTPS conflicts
- Incorrect SSL configuration
- Cloudflare or CDN settings
- Incorrect
.htaccessrules - Redirect plugins
- Conflicting server redirects
- Incorrect domain configuration
- Cached redirects
- Incorrect reverse proxy configuration
- Website migration problems
- Incorrect
wwwand non-wwwsettings
The best solution depends on where the redirect loop originates.
1. Clear Your Browser Cookies and Cache
Before changing WordPress settings, clear your browser’s cached redirects and cookies.
A browser may continue using an old redirect even after the server configuration has been fixed.
Test in Incognito Mode
Open the website in a private or incognito window.
If the website works there, clear the cookies and cache for the affected domain in your normal browser.
You can also test the website using another browser or device.
2. Check WordPress Address and Site Address
Incorrect WordPress URL settings are one of the most common causes of redirect loops.
Go to:
WordPress Dashboard → Settings → General
Check:
- WordPress Address (URL)
- Site Address (URL)
For an HTTPS website, both might normally be:
https://example.com
Avoid configurations where one uses HTTP and the other uses HTTPS unless you have a specific reason and understand the resulting behavior.
For example, this can create problems:
WordPress Address:
https://example.com
Site Address:
http://example.com
If the Dashboard Is Inaccessible
You can temporarily define the URLs in wp-config.php:
define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );
Replace example.com with your actual domain.
These settings override the values stored in the WordPress database.
3. Check HTTP and HTTPS Configuration
A very common redirect loop occurs when WordPress is configured for HTTPS while the server or proxy incorrectly reports that the visitor is using HTTP.
For example:
Browser
↓ HTTPS
Cloudflare/CDN
↓ HTTP
Web Server
↓
WordPress redirects to HTTPS
↓
Cloudflare/CDN
↓ HTTP again
This creates a loop.
Make sure your SSL configuration and proxy settings agree about whether the original visitor connection is HTTP or HTTPS.
4. Check Cloudflare SSL/TLS Settings
If you use Cloudflare or another reverse proxy, check its SSL/TLS configuration.
A common problem occurs when the proxy uses one protocol to connect to the origin server while WordPress expects another.
For an HTTPS WordPress website, using an appropriate end-to-end HTTPS configuration is generally safer.
If your origin server has a valid SSL certificate, configure the CDN to communicate with the origin using HTTPS.
After changing the setting, clear the CDN cache and test the website again.
5. Check the .htaccess File
On Apache servers, .htaccess can contain redirect rules.
A typical WordPress .htaccess file may look like:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Look for additional rules that redirect:
HTTP → HTTPS
HTTPS → HTTP
www → non-www
non-www → www
Two rules that redirect in opposite directions can create an infinite loop.
Before Editing .htaccess
Always create a backup.
If you suspect the file is responsible:
- Rename
.htaccess. - Test the website.
- If the problem disappears, recreate the WordPress rewrite rules.
- Reintroduce custom redirect rules carefully.
6. Check Redirect Plugins
Redirect plugins can cause loops when multiple rules overlap.
Common examples include rules that redirect:
HTTP → HTTPS
while another rule redirects:
HTTPS → HTTP
Or:
example.com → www.example.com
while another redirects:
www.example.com → example.com
Review your redirect plugins and temporarily disable them if necessary.
If the redirect loop disappears, reactivate the plugin and inspect its rules one by one.
7. Check www and Non-www Domain Settings
Your website should have one preferred domain format.
For example:
https://example.com
or:
https://www.example.com
Both can work, but your redirect configuration should consistently point toward one version.
A conflict may occur if:
- WordPress prefers
www - The server prefers non-
www - The CDN redirects to
www - Another plugin redirects back to non-
www
Choose one canonical domain and make all layers use the same destination.
8. Check SSL Certificate Configuration
An SSL certificate problem can sometimes contribute to HTTPS redirect problems.
Check that:
- The certificate covers the domain.
- The certificate has not expired.
- HTTPS works directly on the origin server.
- The CDN and origin use compatible SSL settings.
- HTTP redirects to HTTPS only once.
Test both:
http://example.com
and:
https://example.com
The first should normally redirect to the second once, rather than bouncing between protocols.
9. Check WordPress HTTPS Detection Behind a Proxy
WordPress websites behind reverse proxies may incorrectly detect the connection as HTTP.
If the proxy terminates SSL before forwarding the request to your web server, WordPress may need to receive the correct HTTPS status through the proxy configuration.
For some environments, this may involve server configuration or a setting similar to:
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) &&
'https' === $_SERVER['HTTP_X_FORWARDED_PROTO'] ) {
$_SERVER['HTTPS'] = 'on';
}
Do not add proxy-related code blindly. The correct configuration depends on your CDN, load balancer, web server, and hosting environment.
10. Check for Hardcoded HTTP URLs
Search your WordPress configuration and code for hardcoded URLs such as:
http://example.com
while your website is intended to use:
https://example.com
Check:
- Theme files
- Plugin settings
- Custom PHP code
- Database entries
- CDN configuration
- Redirect rules
Hardcoded HTTP references do not always create redirect loops, but they can contribute to inconsistent URL behavior.
11. Check the Database for Incorrect Site URLs
If you cannot access the WordPress dashboard, you can inspect the wp_options table using phpMyAdmin.
Look for:
siteurl
home
They should normally contain the correct URL.
For example:
https://example.com
If the website should use HTTPS but these values contain HTTP, update them carefully.
Important
Always create a database backup before manually changing database values.
12. Disable Plugins Without Access to wp-admin
If you suspect a plugin but cannot log into WordPress, use File Manager or FTP.
Open:
/wp-content/
Rename:
plugins
to:
plugins-disabled
Then test the website.
If the redirect loop disappears, a plugin is likely responsible.
Rename the directory back to:
plugins
and troubleshoot individual plugins.
13. Check Server Redirect Rules
Your web server may have redirects configured independently of WordPress.
Apache
Check:
.htaccess
and the relevant virtual host configuration.
Nginx
Check the server block configuration for rules such as:
return 301 https://example.com$request_uri;
A server-level HTTPS redirect combined with another reverse-proxy rule can create a loop if the proxy is not forwarding the original protocol correctly.
If you do not manage the server yourself, ask your hosting provider to check the redirect chain.
14. Clear WordPress and CDN Caches
Cached redirects can continue after you have corrected the configuration.
Clear:
- WordPress cache
- Server cache
- Object cache
- CDN cache
- Browser cache
Then test the website again.
For CDN services, purge the relevant cached content according to the provider’s controls.
15. Check Website Migration Settings
Redirect loops are common after moving a WordPress website to another server or domain.
After migration, verify:
- WordPress URL
- Site URL
- SSL certificate
.htaccess- Server redirects
- CDN settings
wwwconfiguration- Database URLs
For example, if the old website used:
http://example.com
but the new server expects:
https://www.example.com
multiple automatic redirects may conflict.
16. Check Domain Forwarding
Your domain registrar or DNS provider may have forwarding configured.
Review any domain-level forwarding rules.
Avoid configuring multiple independent systems to perform the same redirect.
For example, you generally do not want:
Domain forwarding → HTTPS
Server → HTTPS
WordPress plugin → HTTPS
CDN → HTTPS
unless the rules are deliberately configured to work together.
Ideally, there should be one clear canonical redirect path.
17. Check Redirect Chains
A redirect chain occurs when one URL redirects to another, which then redirects again.
For example:
http://example.com
↓
https://example.com
↓
https://www.example.com
↓
https://example.com
↓
Loop
Map the redirects to determine where the cycle starts.
You can use browser developer tools or an HTTP header inspection tool to see the Location response headers.
The goal should be a simple chain, ideally:
http://example.com
↓
https://example.com
↓
200 OK
18. Temporarily Disable SSL or Redirect Plugins
Plugins that force HTTPS or manage redirects can conflict with server-level HTTPS configuration.
Temporarily disable plugins related to:
- SSL
- Redirects
- Security
- Caching
- URL rewriting
Then test the website.
If the site starts working, re-enable the plugins one at a time to identify the conflicting configuration.
19. Check Reverse Proxy or Load Balancer Configuration
Large or high-traffic WordPress websites may use:
- Cloudflare
- Load balancers
- Reverse proxies
- Web application firewalls
- CDN services
These systems can terminate SSL before sending requests to the origin.
If the origin server does not know that the original request was HTTPS, it may repeatedly redirect the request to HTTPS.
Ask your hosting or infrastructure provider to verify:
- Forwarded protocol headers
- SSL termination
- Origin protocol
- Redirect rules
- Canonical hostname configuration
20. Use a Staging Environment for Redirect Changes
Redirect configuration can affect the entire website.
Before making major changes, test them on a staging environment whenever possible.
This is especially important when changing:
- Domain names
- HTTPS configuration
- CDN settings
.htaccess- Nginx configuration
- Redirect plugins
Quick Troubleshooting Checklist
☐ Test the website in Incognito Mode
☐ Clear browser cookies and cache
☐ Check WordPress Address and Site Address
☐ Verify HTTP/HTTPS configuration
☐ Check SSL certificate
☐ Check www/non-www settings
☐ Review .htaccess
☐ Disable redirect plugins
☐ Check server-level redirects
☐ Check Cloudflare/CDN settings
☐ Check reverse proxy configuration
☐ Verify siteurl and home in the database
☐ Clear WordPress/server/CDN caches
☐ Check domain forwarding
☐ Inspect the redirect chain
☐ Test after recent website migration
How to Prevent WordPress Redirect Loops
Follow these practices to avoid future redirect problems:
- Choose one canonical HTTPS URL.
- Avoid duplicate redirect rules.
- Do not configure multiple plugins to manage the same redirects.
- Keep server and CDN settings consistent.
- Use a valid SSL certificate.
- Test redirect rules after website migrations.
- Back up
.htaccessbefore modifying it. - Keep WordPress URL settings consistent.
- Monitor redirect chains.
- Use staging for major URL or SSL changes.
Conclusion
The WordPress “Too Many Redirects” error usually occurs because two or more systems disagree about the correct URL. The most common conflicts involve HTTP versus HTTPS, www versus non-www, WordPress URL settings, CDN configuration, redirect plugins, and server rules.
Start by checking the WordPress URLs and SSL configuration. If the problem remains, inspect .htaccess, redirect plugins, CDN settings, and server-level redirects.
The ideal configuration should have one clear canonical URL and a simple redirect path. Once the conflicting rule is removed, clear your caches and test the website again


