The ”Error too many redirects” issue är ett WordPress error som kan orsakas av ett plugin eller felaktiga Settings. Faktum är att det är ett av de vanligaste error som våra Läsare och andra WordPress användare ser.
Detta error kan till och med låsa dig ute från din website, vilket gör det lite knepigt att fixa. Lyckligtvis har vi troubleshootat problemet med för många redirects flera gånger, så vi vet exakt vad vi ska göra.
I den här artikeln visar vi hur du enkelt fixar ”Error too many redirects”-problemet i WordPress. Vi kommer också att täcka hur du återfår åtkomst till din website och troubleshoot felet.
Experttips: Föredrar du att lämna felsökningen till proffsen? Våra supporttjänster för WordPress kan fixa ditt error på nolltid och få din site att säkerhetskopiera och köra igång igen. Dessutom erbjuder vi engångsfixar, så du behöver inte oroa dig för pågående kontrakt.
Vad orsakar ”Error Too Many Redirects”-problemet i WordPress?
”Error too many redirects” orsakas av en felkonfigurerad issue för redirects i WordPress.
Som du kanske redan vet har WordPress en funktion för sökmotorsoptimering av URL:er som använder redirect-funktionen. På samma sätt använder många populära WordPress-tillägg denna funktion för att ställa in tillfälliga redirects, skapa permanenta 301 redirects och fixa 404 error.
Om du använder ett plugin för att fixa SSL-problemet med osäkert content eller ett plugin för caching i WordPress, kan det också påverka redirects och orsaka error ”too many redirects”.
Så här ser meddelandet ”ERR_TOO_MANY_REDIRECTS” ut i Google Chrome.
Detta error berättar dock inte vad som orsakar konflikten och tvingar fram redirect-loopen i WordPress.
Så här ser error ut i Firefox med message ”The page isn’t redirecting properly”.
Med detta sagt, låt oss ta en titt på hur man fixar error för många redirects issue i WordPress.
Vi kommer att gå igenom Step-by-Step troubleshoot, få tillgång till din WordPress webbplats och förhindra att error inträffar igen.
Video Tutorial
Om du föredrar skriftliga instruktioner är det bara att fortsätta läsa.
1. Clear Cookies och Cache i webbläsaren
En vanlig orsak till error kan vara cookies i din web browser. Försök att komma åt din website med en annan web browser, gillar Firefox, Safari, Opera eller Microsoft Edge.
Om du kan komma åt din website normalt med en annan webbläsare, måste du cleara cookies och cache i din vanliga webbläsare.
Vi har en detaljerad guide om hur du clearar webbläsarens cache i alla större webbläsare som hjälper dig att göra det.
Å andra sidan, om det inte går att fixa problemet genom att byta webbläsare, kan du gå vidare till nästa steg.
2. Deactivate alla tillägg till WordPress
Den vanligaste orsaken till WordPress redirect-loopar eller ”ERR_TOO_MANY_REDIRECTS” är en konflikt med ett plugin. Ett WordPress-tillägg som försöker ställa in en omdirigering på ett sätt som står i konflikt med standard WordPress-omdirigeringar kan orsaka detta error-meddelande.
För att fixa detta måste du deactivate alla WordPress tillägg på din website. Normalt kan du bara gå till Plugins ” All Plugins page i WordPress admin area och deactivate tillägg därifrån.
Vi antar dock att du på grund av error i redirect kanske inte kan komma åt admin area i WordPress.
I så fall måste du deactivate WordPress tillägg med hjälp av en FTP-klient som FileZilla eller File Manager appen i din WordPress webbhotell kontrollpanel.
Anslut bara till din website med en FTP-klient och gå till mappen /wp-content/
.
Där hittar du mappen plugins
, som du måste byta namn på till ”plugins.deactivate”.
På så sätt deaktiveras alla tillägg till WordPress på din site.
I grund och botten letar WordPress efter en folder som heter plugins
för att hämta plugin-filerna. Om den inte hittar denna folder inaktiveras automatiskt de aktiva tilläggen i databasen.
Nu kan du försöka besöka din WordPress website. Om du kan logga in på din WordPress admin area nu, betyder det att ett av tilläggen orsakade error.
För att ta reda på vilket plugin som var den skyldige måste du byta tillbaka till FTP-klienten eller File Manager-appen och byta namn på din plugins.deactivate
folder tillbaka till ’plugins’.
Efter det, växla till WordPress admin area på din website och gå till Plugins ” All Plug ins page. Härifrån kan du aktivera dina tillägg ett efter ett och sedan besöka din website för att se om du kan återskapa error.
När du har hittat det tillägg som orsakar error kan du hitta ett alternativ till det tillägget eller rapportera the issue till tilläggets supportforum för WordPress.
3. Fixa WordPress URL:er
En annan viktig orsak till detta error är en felkonfiguration i WordPress URL-inställningar. Normalt kan du view dessa alternativ på Settings ” General page.
För de flesta webbplatser måste URL:erna i fälten WordPress Address och Site Address vara desamma. Vissa användare kan dock komma att använda ”www” i den ena URL:en och en icke-www URL i den andra.
Eftersom du kanske ej har tillgång till WordPress admin area, kan du behöva fixa WordPress URL:er med hjälp av en FTP-klient eller File Manager app.
Anslut bara till din WordPress site med en FTP-klient och gå till /wp-content/themes/your-theme-folder/
.
Härifrån måste du hitta filen functions.php och editera den med en plain text editor som Notepad eller TextEdit.
Därefter måste du lägga till följande kod längst ner:
update_option( 'siteurl', 'https://example.com' );
update_option( 'home', 'https://example.com' );
Glöm inte att ersätta ”https://example.com” med URL:erna till din egen site. Nu kan du save dina ändringar och uploada filen tillbaka till din website.
Därefter kan du försöka besöka din website för att se om detta löser error.
För fler metoder, se vår tutorial om hur du enkelt ändrar WordPress URL:er.
4. Återställ WordPress .htaccess-fil
.htaccess-filen är en specialfil som används av servern på en website för att hantera redirects och andra settings på servern. WordPress använder också denna fil för sökmotorsoptimering av URL:er och andra redirects.
Ibland kan tillägg till WordPress göra ändringar i .htaccess-filen på din website, vilket kan utlösa detta error. Det är också möjligt att deactivate av ett tillägg inte kommer att ta bort dessa ändringar från din .htaccess-fil.
I så fall måste du manuellt återställa din WordPress .htaccess-fil.
Återigen måste du komma åt din website med hjälp av en FTP-klient eller appen File Manager i adminpanelen på ditt webbhotell. När du är ansluten kommer du att se .htaccess-filen i rotmappen på din website.
Note: Om du inte hittar din .htaccess-fil kan du läsa vår guide om hur du hittar .htaccess-filen i WordPress.
Först måste du ladda ner en kopia av din .htaccess-fil till din dator som backup. Efter det kan du gå vidare och ta bort filen från din website.
Du kan nu försöka besöka din WordPress blogg. Om allt fungerar normalt betyder det att din .htaccess-fil orsakade error vid redirect.
Eftersom vi har tagit bort .htaccess-filen måste du nu återskapa den. Normalt kan din WordPress website göra det på egen hand. För att vara säker går du bara till Settings ” Permalinks page och klickar på knappen ”Save changes” längst ner.
5. Förhindra error för många redirects i WordPress
Förhoppningsvis har de steg vi just har täckt fixat redirect-problemet på din website. Om de inte fixade problemet kan du behöva prata med ditt WordPress webbhotell för att se till att det inte finns ett problem med servern.
När de har fixat problemet på din site bör du också kunna ta reda på vad som orsakade det.
Om det var ett plugin, måste du rapportera issue till plugins supportforum. Se vår guide om hur du ber om support för WordPress. Men om du inte kan få hjälp kan du alltid hitta ett alternativt plugin som gör samma sak.
Om error orsakades av en felaktig konfiguration av WordPress-webbplatsen kan du göra en obs/observera det och se till att inställningarna för din site är korrekt inställda.
För mer tips, se vår detaljerade tutorial om hur du troubleshoot WordPress frågor på egen hand gillar en total WordPress proffs.
Vi hoppas att den här artikeln hjälpte dig att lösa ”error too many redirects” issue på din website. Du kanske också vill bokmärka vår ultimata handbok om vanliga WordPress error och se hur du kontaktar WordPress support.
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.
Syed Balkhi says
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Kamal says
I tried all the solutions given above, still getting the same error ”redirected you too many times.”.
It will be really helpful if I can get any SPOC from WordPress or any other solution which can be tried.
WPBeginner Support says
If none of the methods from our article were able to solve the issue, we would recommend reaching out to your hosting provider to ensure nothing from their end could be the cause of the error and they should be able to help find the reason for the problem.
Administratör
Kerri-Anne says
If you’re using CloudFlare or something like that, especially with GoDaddy, that often causes a redirect loop as well. Update the DNS / Nameservers.
WPBeginner Support says
Thank you for sharing what solved it for you!
Administratör
Kingsley Chukwuemeka says
In my case, the issue affects only some blog posts and I am wondering if this same process will work.
WPBeginner Support says
It should still work even if it is only a few posts.
Administratör
Valerie says
Thank you, 3. Fix WordPress URLs – this one helped!
WPBeginner Support says
Happy to hear our recommendation helped!
Administratör
Nata says
Thank you! Removing the plugin that caused the conflict helped.
WPBeginner Support says
Glad our recommendations were helpful!
Administratör
Mike says
Thank you! Nothing was working for me, changing this SSL setting helped!
WPBeginner Support says
Glad our guide could help!
Administratör
Andrew says
Thank you so much, deleting the ht.access file worked for me
WPBeginner Support says
Glad our guide could help
Administratör
Alex Froitzheim says
Thanks so much for the article! In my case, the problem turned out to be a different one: My domain contained an umlaut (ü). I had to convert my domain name to Punycode and change my wordpress address and site address to the resulting URL.
WPBeginner Support says
Thanks for sharing this for anyone who may also have this issue with an umlaut!
Administratör
Brad Vickers says
If none of the above works and you are using Cloudflare for DNS, check your SSL settings in Cloudflare. If you have an SSL installed on your hosting server, you need to change the SSL mode to Full (strict) in Cloudflare.
WPBeginner Support says
Thanks for sharing what worked for you for this issue.
Administratör
Jonathan Engelsma says
This Cloudflare setting seems to have been my prob… after days of digging around. Thanks man!
Chethan Kumar says
Thank you so much, it helped me a lot… My WP site is struck at page loading, i deleted .htaccess file from server after this working fine… you saved my time… loved it
Gimhan says
Thanks a lot for the content. Removing the .htaccess file which I created manually and letting WordPress create the .htaccess file automatically resolved my issue.
Thanks again.
Mark Lidster says
Man, you just saved me a whole heap of time as I’d created a url redirect from within the admin panel then couldn’t obviously get back in. Thought I was going to have to restore an old backup and lose all my work, but your simple addition to the config file via ftp saved all of that. Thank you so much
WPBeginner Support says
Glad our guide was helpful
Administratör
Stephen says
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?
WPBeginner Support says
You can check your username and password using our guide below:
https://www.wpbeginner.com/beginners-guide/how-to-change-your-password-in-wordpress/
Administratör
Solomon says
Good day,
I have tried all these and nothing seems to be working.
WPBeginner Support says
If none of these recommendations are working for you, we would recommend reaching out to your hosting provider for assistance
Administratör
Jay Wulf says
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’];}
WPBeginner Support says
Thank you for sharing for those on NGINX servers
Administratör
Antoine says
It solved my problem!
I was on HTTPS behind an nginx proxy and I had a redirect loop. Editing the wp-config did the trick!
Ian says
Thank you so much, this fixed my problem on AWS (using Apache)
nechry says
It also solve my redirect problem!
thank-you
Dhruv says
Hello, my problem is not getting solved. My homepage is working fine but the wp-admin has this redirect problem
WPBeginner Support says
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
Administratör
Jack Mwangi says
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.
WPBeginner Support says
You’re welcome, glad our guide was helpful
Administratör
Jim Biancolo says
There’s a fix in the WP is_ssl() docs that worked for me
Mohammed Alshami says
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 ?
WPBeginner Support says
If none of our recommendations were able to assist, we would recommend reaching out to your hosting provider for them to take a look.
Administratör
Jasmin Jai says
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.
WPBeginner Support says
Glad our guide was helpful
Administratör
Jim Biancolo says
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.
Mohammed Alshami says
how did you fix it ?
Aylin says
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
WPBeginner Support says
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
Administratör
Reginald says
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.
WPBeginner Support says
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.
Administratör
Joseph says
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
WPBeginner Support says
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/
Administratör
Solomon Daniels says
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?
WPBeginner Support says
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/
Administratör
Oksana says
May God bless you, the author of this article!!!!
WPBeginner Support says
Glad our article was helpful
Administratör
U.A says
Thanks a lot, solved a big issue for me here!
WPBeginner Support says
You’re welcome, glad our article was helpful
Administratör
ABDUL says
That’s Why I Love wpbeginner, only one minute to solve. Thanx Syed balkhi sir And Team.
WPBeginner Support says
Glad our guide was able to help you
Administratör
Gofar ahmad says
Thanks for all. I love wpbeginner. the best content.
WPBeginner Support says
You’re welcome, glad you like our content
Administratör
Mal says
How did you know my service provider wouldnt take any blame….its like you new there feed back exactly
Thanks for saving the day
WPBeginner Support says
You’re welcome, glad our article could help you solve the issue
Administratör
Ben Jamir says
Beautiful…so nicely explained..this solved my problem
Thank you for such a detailed post.
WPBeginner Support says
You’re welcome, glad you found our post helpful
Administratör
Daniel Cervantes says
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?
WPBeginner Support says
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.
Administratör
Teja T. Diay says
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”
WPBeginner Support says
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/
Administratör
Randy King says
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.
WPBeginner Support says
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.
Administratör
SG says
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
WPBeginner Support says
You would want to start with the steps in this article to see if that resolves the issue
Administratör
nasirey says
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.
WPBeginner Support says
You could try force resetting your password using: https://www.wpbeginner.com/beginners-guide/how-to-reset-a-wordpress-password-from-phpmyadmin/
Administratör
aleecode says
awesome, it works. thanks
WPBeginner Support says
Glad our recommendation could help
Administratör
Lisa says
Thanks for the article. I was able to fix my ”too many redirects” problem by changing the http to https.
WPBeginner Support says
Thanks for sharing the solution that worked for you
Administratör
David Najman says
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.
WPBeginner Support says
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
Administratör
Yavan Kumar says
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…
WPBeginner Support says
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.
Administratör
John Zoetebier says
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’] . ’/’);
WPBeginner Support says
You are missing a slash next to your http in the first define statement but thank you for sharing your workaround.
Administratör
Chad says
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.
WPBeginner Support says
Thanks for sharing how you found the error for others trying to solve this problem
Administratör
Nirav Patel says
Thanks you bro for information of wp error
WPBeginner Support says
Glad our article could help
Administratör
irga says
yeah, you know,,, i searching for it,,,,, and then mys wordpress site working again, thanksfull
Rahul says
Thans buddy , really helps
Josh says
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?
Deby says
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.
Bryant Thomas says
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.
Rutvi Trivedi says
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.
Shakeane says
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.
Marc says
Awesome! Only took 5 minutes and fixed!!!