Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Hur man fixar Error Too Many Redirects Issue i WordPress

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.

Fixing too many redirects error in WordPress

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.

Error Too Many Redirects in 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”.

Too many redirects error in Firefox

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

Subscribe to WPBeginner

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.

Clear cookies and cache in Google chrome

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.

Deactivate all plugins

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/.

Renaming the plugins folder using FTP

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.

Renamed plugins folder

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.

WordPress URL settings

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/.

Edit functions.php file

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.

Editing .htaccess file via FTP

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.

Refresh permalinks to create .htaccess file

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.

Avslöjande: Vårt innehåll stöds av våra läsare. Det innebär att om du klickar på några av våra länkar, kan vi tjäna en provision. Se hur WPBeginner finansieras, varför det är viktigt, och hur du kan stödja oss. Här är vår editoriala process.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Den ultimata WordPress-verktygslådan

Få GRATIS tillgång till vår verktygslåda - en samling WordPress-relaterade produkter och resurser som varje professionell användare bör ha!

Reader Interactions

303 kommentarerLämna ett svar

  1. Syed Balkhi

    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!

  2. Kamal

    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

      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

  3. Kerri-Anne

    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

      Thank you for sharing what solved it for you!

      Administratör

  4. Kingsley Chukwuemeka

    In my case, the issue affects only some blog posts and I am wondering if this same process will work.

    • WPBeginner Support

      It should still work even if it is only a few posts.

      Administratör

  5. Valerie

    Thank you, 3. Fix WordPress URLs – this one helped!

    • WPBeginner Support

      Happy to hear our recommendation helped!

      Administratör

  6. Nata

    Thank you! Removing the plugin that caused the conflict helped.

    • WPBeginner Support

      Glad our recommendations were helpful!

      Administratör

  7. Mike

    Thank you! Nothing was working for me, changing this SSL setting helped!

    • WPBeginner Support

      Glad our guide could help!

      Administratör

  8. Andrew

    Thank you so much, deleting the ht.access file worked for me

    • WPBeginner Support

      Glad our guide could help :)

      Administratör

  9. Alex Froitzheim

    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

      Thanks for sharing this for anyone who may also have this issue with an umlaut!

      Administratör

  10. Brad Vickers

    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

      Thanks for sharing what worked for you for this issue. :)

      Administratör

    • Jonathan Engelsma

      This Cloudflare setting seems to have been my prob… after days of digging around. Thanks man!

  11. Chethan Kumar

    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

  12. Gimhan

    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.

  13. Mark Lidster

    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

      Glad our guide was helpful :)

      Administratör

  14. Stephen

    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?

  15. Solomon

    Good day,
    I have tried all these and nothing seems to be working.

    • WPBeginner Support

      If none of these recommendations are working for you, we would recommend reaching out to your hosting provider for assistance

      Administratör

  16. Jay Wulf

    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

      Thank you for sharing for those on NGINX servers

      Administratör

    • Antoine

      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

      Thank you so much, this fixed my problem on AWS (using Apache)

    • nechry

      It also solve my redirect problem!
      thank-you

  17. Dhruv

    Hello, my problem is not getting solved. My homepage is working fine but the wp-admin has this redirect problem

  18. Jack Mwangi

    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

      You’re welcome, glad our guide was helpful :)

      Administratör

  19. Jim Biancolo

    There’s a fix in the WP is_ssl() docs that worked for me

  20. Mohammed Alshami

    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

      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

  21. Jasmin Jai

    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

      Glad our guide was helpful :)

      Administratör

  22. Jim Biancolo

    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

      how did you fix it ?

  23. Aylin

    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

      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

  24. Reginald

    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

      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

  25. Joseph

    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

  26. Solomon Daniels

    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?

  27. Oksana

    May God bless you, the author of this article!!!!

    • WPBeginner Support

      Glad our article was helpful :)

      Administratör

  28. U.A

    Thanks a lot, solved a big issue for me here!

    • WPBeginner Support

      You’re welcome, glad our article was helpful :)

      Administratör

  29. ABDUL

    That’s Why I Love wpbeginner, only one minute to solve. Thanx Syed balkhi sir And Team.

    • WPBeginner Support

      Glad our guide was able to help you :)

      Administratör

  30. Gofar ahmad

    Thanks for all. I love wpbeginner. the best content.

    • WPBeginner Support

      You’re welcome, glad you like our content :)

      Administratör

  31. Mal

    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

      You’re welcome, glad our article could help you solve the issue :)

      Administratör

  32. Ben Jamir

    Beautiful…so nicely explained..this solved my problem
    Thank you for such a detailed post.

    • WPBeginner Support

      You’re welcome, glad you found our post helpful :)

      Administratör

  33. Daniel Cervantes

    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

      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

  34. Teja T. Diay

    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”

  35. Randy King

    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

      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

  36. SG

    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

      You would want to start with the steps in this article to see if that resolves the issue

      Administratör

  37. nasirey

    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.

  38. aleecode

    awesome, it works. thanks

    • WPBeginner Support

      Glad our recommendation could help :)

      Administratör

  39. Lisa

    Thanks for the article. I was able to fix my ”too many redirects” problem by changing the http to https. :)

    • WPBeginner Support

      Thanks for sharing the solution that worked for you :)

      Administratör

Lämna ett svar

Tack för att du väljer att lämna en kommentar. Tänk på att alla kommentarer modereras enligt våra policy för kommentarer, och din e-postadress kommer INTE att publiceras. Vänligen använd INTE nyckelord i namnfältet. Låt oss ha en personlig och meningsfull konversation.