Running a self hosted WordPress.org site has a lot of benefits, but at times some easily solveable errors can irritate beginners. White screen of death, Internal server error, and some other common WordPress errors can be really stressing for new users. Recently a user pointed our attention to ‘Too Many Redirects’ error in WordPress. It is a common issue that WordPress users may come across. In this article, we will show you how to fix error too many redirects issue in WordPress.
On Firefox, this error will be displayed like this:
“The page isn’t redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete.”
Why I am Getting Error Too Many Redirects in WordPress?
This error usually occurs due to a misconfigured redirection issue. As you know that WordPress has SEO friendly URL Structure which uses the redirect function. Several other popular WordPress plugins also use the redirect functionality. For example, WordPress SEO plugin allows you to remove category base from category URLs by redirecting users to a URL without category base. WordPress SSL and cache plugins also use redirects.
Due to a misconfiguration in any of these redirection tools, your site may end up redirecting users to a URL that is actually redirecting them back to the referring URL. In that case the user’s browser is trapped between two pages and hence you see the error.
Video Tutorial
If you don’t like the video or need more instructions, then continue reading.
How to Solve Too Many Redirects Error in WordPress?
The most common misconfiguration that we have come across repeatedly is when a user has incorrect URL in WordPress Address URL or Site Address URL settings.
For example, lets assume that your site’s url is http://www.example.com
and you go to Settings » General and set it to http://example.com
. Most web hosts allow you to choose whether you would like to add a www prefix to your domain name or have it without www. In case you had selected to add www to your URL, then adding http://example.com in your WordPress settings will cause the error. Or if you opted to use your domain without www prefix, then adding it with www prefix in WordPress settings will cause this error.
When a user will come to http://example.com
, they will be redirected by your server’s configuration to http://www.example.com where they will be redirected back to http://example.com
by WordPress because that’s what you have set up in the settings.
If your site was working fine, and you you did not make any changes to those settings. Then you need to contact your web host, because it is most probably a configuration issue at their end.
However, if you do not have a reliable WordPress hosting provider, and they deny having any issues and/or refuse to help you, then you should consider switching web hosts or fix it yourself.
To fix this, you need to change your WordPress Address and Site Address. Go to Settings » General, change your WordPress and Site Address. If you have your address with www prefix, then change it to non-www URL, and if you have it with non-www URL then add the www prefix.
Important: Make sure that you don’t leave a trailing slash at the end of your URL like http://www.example.com/
Change Site URL Without Access to Admin Area
In case you don’t have access to WordPress Admin area, you can still update these settings by defining them in wp-config.php file. Simply connect to your website using an FTP client. Once you are connected to your site, you will find wp-config.php file in your site’s root directory. You need to download and edit this file using a text editor like Notepad. Simply add these two lines to the file and don’t forget to replace example.com with your own domain.
define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com');
Save the file and upload it back to your web server. Now try to access your WordPress site. If you still can not access your site, then try to add your domain with www prefix.
Fixing Other Redirect Issues
If the previous step did not solve your problem, then it is likely that there is a plugin issue with your site. As we mentioned earlier that several WordPress plugins use redirection techniques to do a variety of things. We will try to help you troubleshoot.
First you need to figure out is which plugin is causing the issue. Did you activate a new plugin recently right before this error happened? Did you update plugins right before this error happened? If the answer to any of the above questions is YES, then it narrows the problem down to that plugin. You can simply deactivate that plugin by deleting that plugin’s folder from wp-content/plugins/
If you do not know which plugin is causing the issue, then you would need to do some trial and error. The quickest way to do this is by deactivating all plugins. After deactivation of all plugins on your site, you need to use FTP to download the .htaccess file as a backup. You can find this file in your site’s root directory. Once you have downloaded the file, delete it from your server. Now try to access your site.
This process will allow your server to regenerate a new .htaccess file, and since there are no plugins activated, it will most likely fix the issue. If the error is gone now, then you know for certain that it was a plugin causing this error.
The next step is to find out which plugin was the culprit. To do this, you need to download and install fresh copies of all your plugins. Activate plugins one at a time and after activating each plugin try to browse several pages on your site using a different browser as a non-logged in user. Hopefully you will find the plugin that caused the issue.
These are all the possible solutions that may fix this “error too many redirects issue” in WordPress. Did any of the above solutions fixed the problem for you? If so, then please let us know in the comments. Have you encountered the error too many redirects issue in the past? how did you fix it? If you know a fix that is not listed in the article above, then please contribute in the comments below. We will make sure to keep the article up to date with any new advice from our users.
If you liked this article, then please consider following us on Twitter and Google+.
Hi!
Thank you for your post…
I was able to solve mine changing the WP_SITEURL and WP_HOME to lowercase letters. I capitalized each word formerly for readability and as it turned out, it redirects post paginated pages.
Everything seems fine now. Thank You
I made a redirect in ADDOn Domain to rid my site of a tail, “/blog”, behind my URL, appeared when launched the site. This was in my opinion automatically done, as I have two sites on the same PUBLIC_html directory. probably to avoid conflict of files with the same name of the two sites
None of these fixes worked for me. In the end it turns out I had setup a custom page rule in CloudFlare a long time ago to treat the wordpress dashboard different to the rest of the site. It had “SSL – Flexible” set which causes the error. I just set the rule to “Full” and it works fine again.
I also had the problem, so I started searching for a solution and found out that the CDN was causing that error. I switched it off and it worked again
I deactivated all plugins, disabled the current theme, deleted .htaccess, but I’m still getting the “too many redirects” error when I try to access my wordpress site. What is causing it and how can I fix it?
Just had this happen to me on a new site I’m working on. The issue turned out that I created my child theme with spaces in the name. As soon as I renamed the child theme folder to my-child-theme it worked. I did have to go and make my child theme active again to make it work right. Hope this saves someone so grief and aggravation!
Dan, I just wanted to say THANK YOU!!!!!!!
That was my problem too, apparently. I changed the name and folder to include a dash and everything works fine.
I’m finding that when I try to set my Permalink to Post Name I get the redirect issue. When I set it to Plain, no issues. I’ve disabled all the plugins and still the same thing.
I’m new to WP but 20+ years IT, any help would be greatly appreciated.
+1 on this and thank for for so thoroughly and generously sharing your knowledge – you saved me hours of work today.
This is a really helpful article. I had the redirection issues with my WordPress website. I just changed my Post URLS going to Setting>Permalinks.
My site is redirected too many time in the preview of customization
other functions of theme are working fine.
please tell the solution for the problem
Thank you so much. I called my hosting service help desk twice and nothing they told me to do helped. This fixed the error.
I’m getting “ERR_TOO_MANY_REDIRECTS” problem only on website Home page but other pages working fine. I think plugin “Redirection” create this problem but it’s my need to keep activate this.
Please suggest.
Thank you so much!! I have been looking for solution for whole day and finally solved it.
Thank you
ive tried the first option, Settings » General and changed the url. the thing is, i accidentally put a ; instead of a . on the adress.
Now the site is all messed up and i cant even login on the admin user anymore, to change it back :/ any tips?
Hi Maria,
You can fix this by adding this code to your WordPress site’s wp-config.php file.
Don’t forget to replace example.com with your own domain name.
Hi, Every time I go to the WIDGET page to load my adsense ads then my page freezes up and becomes unresponsive, how can I fix this, please
Thank you that worked
I tried all the things mentioned in the blog but issue still persisted so I did what Jake Philips(one of the comment above) did and I found that something had changed the permalink structure setting to:
/’/%year%/%monthnum%/%day%/%postname%/’
I changed it back to (as the comment suggests) :
/%year%/%monthnum%/%day%/%postname%/
and then everything was working fine again…
Thank You. It worked
When I put my link on Facebook my photo that’s on my webpage does not come up just my website name and URL. Any idea what I need to do to have a thumbnail photo?
Hi. I am having a some what odd issue, i feel. My redirect issue is that when i attempt to access my wordpress admin page using my domain, it redirects me to godaddy.com. my only explanation I can come up with is that i purchased my domain name from godaddy. However i purchased my web hosting from hostgator. Regardless, i can not access my admin page for wordpress to begin establishing my new website.
Any and all help or suggestions would be greatly appreciated! Thanks
Hi Khori,
You can contact GoDaddy support and they can help you point out your domain name to your hosting provider. All you need to do is go to your GoDaddy account and point Name Server settings for your domain name to HostGator.
In my case the problem was special characters in the URL. You can’t have those with wordpress. E.g. German umlauts: ÄÖÜ – need to be converted.
I panicked when I could not access my website home screen (though I could the other pages). I messed around with the Settings=>General URL settings, and I saw that the same address appeared as the WordPress URL and the website URL—which meant it was going around in circles, as you pointed out. I fiddled with that for awhile, almost locking myself out of WordPress altogether, but then deactivated several recently installed plugins. Fixed! I’m not sure which plugin caused it—I will investigate that, by omitting the one I think is most likely and one-by-one reactivating the others, but my suggestion is to follow your article from the bottom up. Check out those recent plugins!
I had just enabled CDN and SSL in Bluehost for my WordPress site when this started happening. I found that something had changed the permalink structure setting to:
/’/%year%/%monthnum%/%day%/%postname%/’
I changed it back to:
/%year%/%monthnum%/%day%/%postname%/
and then everything was working fine again…
Hi,
Your article is really good and may be a solution of my recent problem. But I am not a WordPress expert and not enough brave to experiment with my site, though the blog is completely built by myself.
However, I’m seeing the following things from last two days–
“This page isn’t working
m redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS”
I’ve tried many times after clearing cookies, still, I can’t log into my site.
Can you please give a solution?
Hi Asma,
If you have tried steps mentioned above, then you can try our WordPress troubleshooting guide. It will help you figure out what’s causing the issue and how to fix it.
My problem seemed to be a mixture of plugins and wp-config.php. After deactivating my plugins, I was able to access my site but not my wp-admin area. I fixed this by updating my wp-config with the codes provided above. However, they worked only after I put them before the “/* That’s all, stop editing! Happy blogging. */” line. This was something you guys didn’t include in your tutorial but I found somewhere else. So thanks for everything. My site works now.
Just wanted to say this article helped me a great deal… Here’s my case:
WP installed in a directory: domain.com/widget
domain.com .htaccess edited for SEO purposes to say
DirectoryIndex /widget/index.php /widget/
This caused the “too many redirects” issue. Possibly because of the trailing slash in the domain.com .htaccess file??
Anyway, this fixed it:
domain.com .htaccess edited to:
DirectoryIndex /widget
Now it works.
Huzzay for cPanel!!!
My issue is that trying to access the login page keeps giving me a redirect to https:// but my site is in http://. Have tried everything, adding home url to config.php, disabling plugins, renewing .htaccess. There is no redirect defined in CPanel so I’m lost as to why this is happening. The site is available, but I cannot access admin.
Getting a bit hopeless here…
Please contact your WordPress hosting provider, they may be able to help you out.
If none of the above works, rename your .htaccess file to htaccess.old or something. Try to log in again.
Thanks a lot, Finally i solve it by spending whole week. only adding to the wp-config.com
define(‘WP_HOME’,’http://example.com’);
define(‘WP_SITEURL’,’http://example.com’);
One way that you can create the infinite redirect loop is to set WordPress Address and Site Address using camel case, MyExampleWebsite.com for example . The domain part of a URI is supposed to be case-insensitive, the file part has to be case sensitive to cope with case-sensitive file systems. WordPress breaks if you use camel-case.
I had the same problem, solved it by going to cpanel then look in the security tab if there is mod security , if yes deactivate it.
That was it for me.
Thank you for writing this. I set up redirection with Easy HTTPS Redirection, and ran into the “too many redirections” problem. I solved it by turning off a property in Woo Commerce. In the checkout settings, I had both “force secure checkout” and “force HTTP when leaving the checkout” selected. I unselected the “force HTTP when leaving the checkout”, and no longer see the “too many redirections” problem. I didn’t have to edit any .htaccess file.
If the issue is happening only when accessing the admin control panel , then look at the wp-admin and check if there is htaccess file in place (www/wp-admin/.htaccess ) and if you find one then rename it and refresh the admin URL (example.com/wp-admin/) and it should work .
Simply superb, this resolved the redirect loop issue I was facing, thanks a lot, appreciate the article
Hi, I’ve tried all the troubleshooting options here but nothing seems to work. The last thing I remember doing was to take a full backup using the Backup Wizard on the cPanel. Could that in any way lead to this error (Too many redirects)
Here’s a list of what I’ve done so far to fix this issue:
1) Removed the backup file from the root directory
2) Edited the wp-config file by adding those 2 lines of code, both with and without www
3) Deleted the .htaccess files from the root directory and wp-content folder one at a time
4) Scanned through all the comments to see if there is any possible solution, to no avail
I have sought for the help of the root admin, hopefully we’d be able to fix this ASAP. If you think I’ve missed out on anything or could try anything apart from these, please do let me know.
Thanks
Akash
I could finally fix the problem. It had something to do with the backend I guess. My admin reset the server and that breathed life into my website again. Thanks for this post though. Good luck to all trying to fix this problem. May the force be with you
I’ve tried all the suggested solutions but unfortunately none of them seem to work for me. The last thing I remember doing on the cPanel was to use the Backup wizard to take a full backup of the site. After that I’m assuming, the too many redirects error started showing up. I don’t even have access to the admin panel now. Could that in any way be linked to this problem?
Here’s what I’ve done so far:
1) I added those lines of code to the wp-config.php file with and without www
2) I deleted 2 .htaccess files, one in the root directory and another in the wp-content folder, one by one
3) I renamed the plugins folder to deactivate it
4) I downloaded the backup file from the root directory and deleted it from the server
4) I ran through all the comments scanning for a possible fix, but to no avail
Any assistance in any way would be highly appreciated.
Thanks!
that’s work great for wordpress.
many thanks!
It can be fixed by disable or enable plugins on WordPress Tools.
In my case the culprit was a redirect plugin that had a feature (which I don’t remember turning on, so it may have been done automatically during a version update) that monitors changes in page URLs and creates automatic redirects. The idea behind it is, if you had a page that you originally created under Category A, then moved it to Category B, the plugin would automatically create a HTTP 301 redirect from /category_a/slug to /category_b/slug. Except it isn’t smart enough to delete that redirect if you subsequently decided to move the page back to Category A and would stupidly create a second redirect from /category_b/slug to /category_a/slug. This would create an infinite redirect loop.
My solution to this idiocy was to disable the auto-redirect feature.
Thanks a lot !
My website is running fine no problem with that i have edited .htaccess file also the code you provided but still this problem exist
I have deactivated all plugins (folder name changed in wp-content) but still unable to login into admin area error is same that ERR_TOO_MANY_REDIRECTS please suggest me I am trying to resolve this I can’t publish my articles since 2 days
I found out that there are two .htaccess files, one in www folder and other www/wp-admin folder. I also discovered that I had security enable where the admin folder was only allowed from a specific IP. My DSL provider changed my outbound IP at sometime and start causing me “redirect” issues. Once I add the new IP into www/wp-admin/.htaccess file, I was able to see my admin login page.
I deleted the .htaccess file but a new one has not generated. Is there something I need to do to generate the new .htaccess file?
After deleting the .htaccess file, you need to log in to your admin area, go to Settings -> Permalinks, select the appropriate url choice you prefer, then hit Save. A new .htaccess file will be generated for you.
After trying all the solutions suggested above without success. I stumbled upon a solution, my wp-admin folder was inside a cgi-bin folder, I don’t know how the folder was create, I copied my wp-admin folder to the main folder and deleted the cgi-bin folder.
Thanks all
When I change my domain, on both the WordPress address and the site address, when I log it to the admin page will it be with my new domain?
Right now it is http://www.example.com/wp-admin/
when I change it and remove the www will it be the same login in or will it now be
http://example.com/wp-admin/?
Hi Emma,
It will be http://example.com/wp-admin/
Please happened to me the same problem on a link to the Control Panel( wp-admin) and you just experimenting with the second solution did not succeed with me
I have infinite loop redirection when I change in settigns->general
http://example.com to https://example.com , I think this means that there is some redirection from https to http, but I cannot find it, as far as I know I dont have plugins that redirect from https to http, but I think this is a standard feature of worpdress, how can I turn it off?
Thanks.
Hi Romas,
No it is not a WordPress feature. If you do not have SSL installed on your site then you need to use http:// in both site address and WordPress address fields on Settings -> General page.
Thank you so much.Just saved my day.
Accidently i changed my site url.thanks for the help
Thank you! Fixed my redirect issue by turning off a WordPress HTTPS plugin!