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 subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Hi,
I tried to add the www. in general settings in wordpress as you suggested, only now i cannot acces my wordpress domain anymore… it says it does not recognize my login username and/or password, any suggestions?
You can check your username and password using our guide below:
https://www.wpbeginner.com/beginners-guide/how-to-change-your-password-in-wordpress/
Good day,
I have tried all these and nothing seems to be working.
If none of these recommendations are working for you, we would recommend reaching out to your hosting provider for assistance
Hi, I was struggling with this issue for a while and it took me a great degree of research to actually find the solution.
If you are experiencing “Too many redirects” problem with WordPress
In my situation, the new website was behind a reverse proxy (NGINX).
You need to add this to the fix list above.
Modify wp-config.php add the text
/**
* Handle SSL reverse proxy
*/
if ($_SERVER[‘HTTP_X_FORWARDED_PROTO’] == ‘https’)
$_SERVER[‘HTTPS’]=’on’;
if (isset($_SERVER[‘HTTP_X_FORWARDED_HOST’])) {
$_SERVER[‘HTTP_HOST’] = $_SERVER[‘HTTP_X_FORWARDED_HOST’];
Thank you for sharing for those on NGINX servers
Hello, my problem is not getting solved. My homepage is working fine but the wp-admin has this redirect problem
You would want to go through some of our recommendations in our article below:
https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
To help find the issue
I cannot be able to express my gratitude but I realy thank you very much for your assistance. The last method really worked for me.. Thanks a lot again.
You’re welcome, glad our guide was helpful
There’s a fix in the WP is_ssl() docs that worked for me
at my site i did all the mentioned steps and i still don’t get any thing i don’t know how to fix it anyone can help ?
If none of our recommendations were able to assist, we would recommend reaching out to your hosting provider for them to take a look.
Wonderful content and very informative! It took awhile but we were able to fix our WordPress issue online on our website because of your helpful article here! Thanks again.
Glad our guide was helpful
I was tearing my hair out over this and found another thing to check. If you’re behind a load balancer this can cause the WordPress is_ssl() function to return incorrect values, which can put you into a redirect loop as it tries to redirect to a secure URL even though you’re already at a secure URL.
how did you fix it ?
Hello. I have tried every recommendation that you have given: plugin, htaccess, wp-config.php but none of them works for me. Please help!!! Thanks
If none of these recommendations were able to help you, then we would recommend reaching out to your hosting provider for them to take a look
Thank you for this article. Very informative and the way you explained things was so helpful.
I understand the issue when it is happening over the entire website. My problem is that one category of pages (registration pages for my memberships) is being affected by this issue. Any idea why the error would be specific to a category?
Every other page on my site is working.
You would first want to go through the steps in this article. If it still continues you would want to ensure you don’t have any plugins possibly creating redirects.
Hi, Please what should i do?
i followed the steps involved in removing the /wp in my siteurl. then immediately i altered the wordpress and siteurl and saved changes, i have been unable to login into the wp-admin. the following is the error message i received.
“The document has moved here.
Additionally, a 302 Found error was encountered while trying to use an ErrorDocument to handle the request.”
thank you
It would depend on which of the methods you used from our article below for removing WordPress from your URL:
https://www.wpbeginner.com/wp-tutorials/how-to-get-rid-of-wordpress-from-your-wordpress-site-url/
Hi! I cloned my site to a new URL using GoDaddy’s Installatron feature, and now when I try to access the cloned site using the new URL, it says ‘too many redirects.’ This means I can’t even access the WordPress back end. Is there a way to try disabling plugins without that access? Do I just temporarily move them to a new folder? Or do you have any suggestions?
We have a guide for how to disable plugins that you can follow here:
https://www.wpbeginner.com/plugins/how-to-deactivate-all-plugins-when-not-able-to-access-wp-admin/
May God bless you, the author of this article!!!!
Glad our article was helpful
Thanks a lot, solved a big issue for me here!
You’re welcome, glad our article was helpful
That’s Why I Love wpbeginner, only one minute to solve. Thanx Syed balkhi sir And Team.
Glad our guide was able to help you
Thanks for all. I love wpbeginner. the best content.
You’re welcome, glad you like our content
How did you know my service provider wouldnt take any blame….its like you new there feed back exactly
Thanks for saving the day
You’re welcome, glad our article could help you solve the issue
Beautiful…so nicely explained..this solved my problem
Thank you for such a detailed post.
You’re welcome, glad you found our post helpful
Well, our website was working just fine then all of a sudden our site went down,
I did all the steps above.
what else can we do?
If the methods in this article aren’t working and you’re seeing the too many redirects error, you would want to reach out to your hosting provider to ensure this isn’t an error from their end.
I tried with deleting the www. and now I can’t even log in in to the wp-admin anymore, I just get a page with info saying that my page is not working due to too many redirects.
How can I fix this, I need to continue developing my website.
“This page isn’t working redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS”
You would want to bring back the www to your site, to do that you would edit the options table similar to our guide here:
https://www.wpbeginner.com/beginners-guide/how-to-reset-a-wordpress-password-from-phpmyadmin/
Once you do, for removing www you can follow our guide here:
https://www.wpbeginner.com/beginners-guide/www-vs-non-www-which-is-better-for-wordpress-seo/
Here is a totally bizarre solution. The infinite login loop just started happening with no change in plugins, etc. I did everything – changed my theme, replaced the .htaccess file, etc. Here’s what I finally ended up doing that seems to have fixed everything: I rebooted my laptop and waited for several hours (in case it was a hosting problem). When I came back in, it all worked.
I tried clearing browser cache and did everything I could find, but nothing worked. I suspect there was something wacky going on that a reboot cleared up for me. And this is not the first time that this happened. Totally bizarre.
That is an odd solution but thanks for sharing it, you may want to check with your hosting provider to see if they see the error as well if it continues.
I’m facing a problem with my multisite network. Its created in local host. Everytime I try to access the new site it shows an error saying “The page isn’t redirecting properly”. If you can help that’d be great! Thanks
You would want to start with the steps in this article to see if that resolves the issue
i have problem for accessing my wordpress dashboard, when i try to access my wp- admin area it shows me your password is incorrect although my password is correct so if any one can help that kind of problem reply me. thanks.
You could try force resetting your password using: https://www.wpbeginner.com/beginners-guide/how-to-reset-a-wordpress-password-from-phpmyadmin/
awesome, it works. thanks
Glad our recommendation could help
Thanks for the article. I was able to fix my “too many redirects” problem by changing the http to https.
Thanks for sharing the solution that worked for you
Hi,
I had this error on the product tag page. I tried all the possible repairs mantioned above with no luck.
Finally, I had to rename slug for tags not to be numbers, eg. 2016, so I renamed it to r2016 and it started to work!
It must have been caused by some wordpress update, because it have been working few years before with tags named as numbers.
Thanks for sharing what worked for you, if your product page is created by a plugin you may want to try reaching out to the plugin’s support to let them know about that issue
Hi,
My whole website is running properly, but the homepage is redirected too many times and same issue with the wp-admin page too. I tried all the methods you mentioned but nothing worked for me.
Please advice me if there is any another solution for that.
Thanks in advance…
If none of the methods from the article worked, you would want to reach out to your hosting provider for them to see if there are any issues they can see on their end.
My web site is a Bitnami WordPress deployment on Google Cloud Platform.
When I use:
define(‘WP_SITEURL’, ‘http:/example.cloud’);
the home page gets redirected to itself and browsers error message.
I now use the original Bitnami setting and it works great !
define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/’);
You are missing a slash next to your http in the first define statement but thank you for sharing your workaround.
I had to desactivate a plugin and it worked back fine. I identified the plugin to desactivate by looking into my URL where I was getting a redirect error. The plugin name was written there.
Thanks for sharing how you found the error for others trying to solve this problem
Thanks you bro for information of wp error
Glad our article could help
yeah, you know,,, i searching for it,,,,, and then mys wordpress site working again, thanksfull
Thans buddy , really helps
I’ve tried all the steps here with no luck today. Luckily my website is functioning ok but I can’t log into the wp-admin dashboard for anything.
What are the other options? There must be other ways I can figure out what’s causing it?
I’m having the same. My site works fine for visitors, but I only get the redirect error for the backend, my WP dashboard.
It’s a new site and I don’t even have any plugins installed yet. I’m stumped.
Holy Cow That worked, I’ve done many websites migrations and never ran into this issue. Thank you the define(‘WP_HOME’,’http://example.com’);
define(‘WP_SITEURL’,’http://example.com’); worked with the www.
Hi, My problem is when I go to my site’s dashboard(/wp-admin) it is giving me this error I tried this solution and unfortunately it is not working. Please help me to solve this error.
I just want to say thank you so much for sharing this knowledge, you wouldn’t understand how much this has helped me, something as minor is adding www or leaving the forward slash at the end has caused so many headaches, thank you so much.
Awesome! Only took 5 minutes and fixed!!!
dear sir,
i have huge data on my website i change my address directly from http://www.example.com to example.com i remove www from wp-confiq and phpmyadmin without doing the above procedure, now i update all the plugin and theme everything is fine but my theme setting is not editing when i am going to change setting of my theme the changes reverting …please help how to solve this problem i will be thankful to you
i am trying to solve this problem from three days but fail
please help
Hi, my website is running without any error but i have this issue in backend when i open appearance>customize tab. I am unable to customize my website from backend. How can i solve it?
Wow, this actually worked, thanks!!
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
Hey, this was my problem! Thanks for your comment here.
This was my problem as well.
This was my problem too! Thanks for your comment! I tried everything in the video but nothing worked.
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.
This was the fix for me. Thank you so much!
Oh God! Thank you so much
Thanks a lot for this fix, after like 5 hours on this error, finally solved the issue. I spend more time on fixing errors than building website with wordpress. I’m tired
Thanks bro. Hours of checking .htaccess etc and its just a simple cloudflare problem.
This was the solution for me too. Thank you so much for sharing!
This fixed mine! Thanks!
Same here – once “Flexible” was changed to “Full” in the Cloudflare SSL settings, it worked! Phew. (Wish I saw your comment sooner!)
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
Thank God I saw your reply. I thought because I had added the Yoast SEO plugin, it was causing the issues, but I had also activated CDN in my control panel and that was the problem!
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.