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

Como corrigir o problema do erro “Too Many Redirects” no WordPress

Nota editorial: Ganhamos uma comissão de links de parceiros no WPBeginner. As comissões não afetam as opiniões ou avaliações de nossos editores. Saiba mais sobre Processo editorial.

Você está tentando corrigir o problema “Error too many redirects” em seu site WordPress?

É um erro comum do WordPress que pode ser causado por um plugin ou por configurações incorretas. No entanto, ele faz com que os usuários fiquem bloqueados em seus sites do WordPress, o que o torna particularmente problemático.

Neste artigo, mostraremos a você como corrigir facilmente o problema “Error too many redirects” no WordPress. Também abordaremos como recuperar o acesso ao seu site e solucionar o erro.

Fixing too many redirects error in WordPress

O que causa o problema do “Erro de muitos redirecionamentos” no WordPress?

O “Error too many redirects” é causado por um problema de redirecionamento mal configurado no WordPress.

Como você já deve saber, o WordPress tem um recurso de estrutura de URL amigável para SEO que usa a função de redirecionamento. Da mesma forma, muitos plug-ins populares do WordPress usam esse recurso para configurar redirecionamentos temporários, criar redirecionamentos 301 permanentes e corrigir erros 404.

Se você estiver usando um plug-in para corrigir o problema de conteúdo SSL inseguro ou um plug-in de cache do WordPress, isso também poderá afetar os redirecionamentos e causar o erro “too many redirects”.

Esta é a aparência da mensagem “ERR_TOO_MANY_REDIRECTS” no Google Chrome.

Error Too Many Redirects in Google Chrome

No entanto, esse erro não informa o que está causando o conflito e forçando o loop de redirecionamento no WordPress.

Esta é a aparência do erro no Firefox com a mensagem “A página não está sendo redirecionada corretamente”.

Too many redirects error in Firefox

Dito isso, vamos dar uma olhada em como corrigir o problema do erro “too many redirects” no WordPress.

Vamos orientá-lo na solução de problemas passo a passo, obtendo acesso ao seu site WordPress e evitando que o erro ocorra novamente.

Tutorial em vídeo

Subscribe to WPBeginner

Se você preferir instruções por escrito, continue lendo.

1. Limpe os cookies e o cache do navegador

Uma causa comum do erro pode ser os cookies do navegador da Web. Tente acessar seu site usando um navegador diferente, como Firefox, Safari, Opera ou Microsoft Edge.

Se for possível acessar o site normalmente usando um navegador diferente, será necessário limpar os cookies e o cache do navegador em seu navegador normal.

Clear cookies and cache in Google chrome

Temos um guia detalhado sobre como limpar o cache do navegador em todos os principais navegadores que o ajudará a fazer isso.

Por outro lado, se a alteração do navegador não resolver o problema, você poderá passar para a próxima etapa.

2. Desativar todos os plug-ins do WordPress

A causa mais comum dos loops de redirecionamento do WordPress ou “ERR_TOO_MANY_REDIRECTS” é um conflito de plugins. Um plug-in do WordPress que tenta configurar um redirecionamento de uma forma que entra em conflito com os redirecionamentos padrão do WordPress pode causar essa mensagem de erro.

Para corrigir isso, você precisa desativar todos os plug-ins do WordPress em seu site. Normalmente, basta acessar a página Plug-ins ” Todos os plug-ins na área de administração do WordPress e desativar os plug-ins a partir daí.

Deactivate all plugins

No entanto, supomos que, devido ao erro de redirecionamento, talvez você não consiga acessar a área de administração do WordPress.

Nesse caso, será necessário desativar os plug-ins do WordPress usando um cliente FTP como o FileZilla ou o aplicativo Gerenciador de arquivos no painel de controle da hospedagem do WordPress.

Basta conectar-se ao seu site usando um cliente FTP e acessar a pasta /wp-content/.

Renaming the plugins folder using FTP

Lá você encontrará a pasta plugins, que precisa ser renomeada para ‘plugins.deactivate’.

Isso desativará todos os plug-ins do WordPress em seu site.

Renamed plugins folder

Basicamente, o WordPress procura uma pasta chamada plugins para carregar os arquivos de plugin. Quando não encontra a pasta, ele desativa automaticamente os plug-ins ativos no banco de dados.

Agora, você pode tentar acessar seu site do WordPress. Se for possível fazer login na área de administração do WordPress agora, isso significa que um dos plug-ins estava causando o erro.

Para descobrir qual plug-in foi o culpado, você precisa voltar ao cliente FTP ou ao aplicativo Gerenciador de arquivos e renomear a pasta plugins.deactivate de volta para “plugins”.

Depois disso, vá para a área de administração do WordPress do seu site e acesse a página Plugins ” Todos os plugins. A partir daí, você pode ativar seus plug-ins um a um e, em seguida, visitar seu site para ver se consegue reproduzir o erro.

Depois de encontrar o plug-in que está causando o erro, você pode encontrar uma alternativa para esse plug-in ou relatar o problema ao fórum de suporte do WordPress do plug-in.

3. Corrigir URLs do WordPress

Outra causa importante desse erro é uma configuração incorreta nas definições de URL do WordPress. Normalmente, você pode visualizar essas opções na página Configurações ” Geral.

WordPress URL settings

Para a maioria dos sites, os URLs nos campos Endereço do WordPress e Endereço do site devem ser os mesmos. No entanto, alguns usuários podem acabar usando “www” em um URL e um URL não www no outro.

Como talvez você não tenha acesso à área de administração do WordPress, talvez seja necessário corrigir os URLs do WordPress usando um cliente FTP ou o aplicativo File Manager.

Basta conectar-se ao seu site WordPress usando um cliente FTP e acessar /wp-content/themes/your-theme-folder/.

Edit functions.php file

A partir daí, você precisa localizar o arquivo functions.php e editá-lo usando um editor de texto simples, como o Notepad ou o TextEdit.

Em seguida, você precisa adicionar o seguinte código na parte inferior:

update_option( 'siteurl', 'https://example.com' );
update_option( 'home', 'https://example.com' );

Não se esqueça de substituir “https://example.com” pelos URLs de seu próprio site. Agora você pode salvar as alterações e carregar o arquivo de volta ao seu site.

Depois disso, tente visitar seu site para ver se isso resolve o erro.

Para obter mais métodos, consulte nosso tutorial sobre como alterar facilmente os URLs do WordPress.

4. Redefinir o arquivo .htaccess do WordPress

O arquivo .htaccess é um arquivo especial usado pelo servidor do site para gerenciar redirecionamentos e outras configurações do servidor. O WordPress também usa esse arquivo para URLs amigáveis para SEO e outros redirecionamentos.

Às vezes, os plug-ins do WordPress podem fazer alterações no arquivo .htaccess do seu site, o que pode acionar esse erro. Também é possível que a desativação de um plug-in não remova essas alterações do seu arquivo .htaccess.

Nesse caso, você precisará redefinir manualmente o arquivo .htaccess do WordPress.

Novamente, você precisará acessar seu site usando um cliente FTP ou o aplicativo Gerenciador de arquivos no painel de controle de sua hospedagem. Uma vez conectado, você verá o arquivo .htaccess na pasta raiz do seu site.

Editing .htaccess file via FTP

Observação: se não conseguir encontrar o arquivo .htaccess, consulte nosso guia sobre como localizar o arquivo .htaccess no WordPress.

Primeiro, você precisa fazer o download de uma cópia do arquivo .htaccess para o seu computador como backup. Depois disso, você pode prosseguir e excluir o arquivo do seu site.

Agora você pode tentar visitar seu blog do WordPress. Se tudo funcionar normalmente, isso significa que o arquivo .htaccess estava causando o erro de redirecionamento.

Agora, como excluímos o arquivo .htaccess, você precisará recriá-lo. Normalmente, seu site WordPress pode fazer isso por conta própria. Para ter certeza, basta acessar a página Configurações ” Permalinks e clicar no botão “Salvar alterações” na parte inferior.

Refresh permalinks to create .htaccess file

5. Como evitar muitos redirecionamentos de erro no WordPress

Esperamos que as etapas que acabamos de abordar tenham corrigido o problema de redirecionamento em seu site. Se elas não resolveram o problema, talvez seja necessário falar com a empresa de hospedagem do WordPress para garantir que não haja um problema no servidor.

Depois que eles corrigirem o problema em seu site, você também poderá descobrir a causa.

Se for um plug-in, você precisará relatar o problema ao fórum de suporte do plug-in. Consulte nosso guia sobre como solicitar suporte do WordPress. No entanto, se não conseguir obter ajuda, você sempre poderá encontrar um plug-in alternativo que faça a mesma coisa.

Se o erro tiver sido causado por uma configuração incorreta do site do WordPress, você poderá anotá-lo e garantir que as configurações do site sejam definidas corretamente.

Para obter mais dicas, consulte nosso tutorial detalhado sobre como solucionar problemas do WordPress por conta própria como um verdadeiro profissional do WordPress.

Esperamos que este artigo tenha ajudado a resolver o problema do “erro de muitos redirecionamentos” em seu site. Talvez você também queira marcar nosso manual definitivo de erros comuns do WordPress e conferir nossa lista dos melhores plug-ins e ferramentas de SEO para WordPress.

Se você gostou deste artigo, inscreva-se em nosso canal do YouTube para receber tutoriais em vídeo sobre o WordPress. Você também pode nos encontrar no Twitter e no Facebook.

Divulgação: Nosso conteúdo é apoiado pelo leitor. Isso significa que, se você clicar em alguns de nossos links, poderemos receber uma comissão. Veja como o WPBeginner é financiado, por que isso é importante e como você pode nos apoiar. Aqui está nosso processo editorial.

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.

O kit de ferramentas definitivo WordPress

Obtenha acesso GRATUITO ao nosso kit de ferramentas - uma coleção de produtos e recursos relacionados ao WordPress que todo profissional deve ter!

Reader Interactions

303 ComentáriosDeixe uma resposta

  1. 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!

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

      Administrador

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

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

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

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

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

  8. 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 :)

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

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

      Administrador

  10. 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’];}

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

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

      Administrador

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

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

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

      Administrador

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

      Administrador

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

  18. 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?

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

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

      Administrador

  21. 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”

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

      Administrador

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

      Administrador

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

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

      Administrador

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

      Administrador

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

      Administrador

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

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

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

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

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

Deixe uma resposta

Obrigado por deixar um comentário. Lembre-se de que todos os comentários são moderados de acordo com nossos política de comentários, e seu endereço de e-mail NÃO será publicado. NÃO use palavras-chave no campo do nome. Vamos ter uma conversa pessoal e significativa.