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

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

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

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

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

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

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

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

  10. hassan says

    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

  11. Sachin says

    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?

  12. Toheeb says

    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

  13. Rudy Reteig says

    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

  14. Robin says

    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.

  15. Florian says

    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

    • Jennifer says

      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!

  16. Alex Jr says

    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?

  17. Dan says

    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!

    • ANA says

      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.

  18. Santiago says

    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.

  19. Damion says

    +1 on this and thank for for so thoroughly and generously sharing your knowledge – you saved me hours of work today.

  20. Bilal Asghar says

    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.

  21. Ebad Ur Rehman says

    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

  22. Sharon Booker says

    Thank you so much. I called my hosting service help desk twice and nothing they told me to do helped. This fixed the error.

  23. Amit Khandelwal says

    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.

  24. maria says

    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?

  25. Em Walker says

    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

  26. Abiskar Bharati says

    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…

  27. Cindy says

    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?

    • Felix says

      Hi, CINDY.
      That’s because you didn’t use Yoast plugin, and didn’t set the rules on Facebook tab. The issue is related to open graph protocol.

  28. Khori Carnes says

    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

    • WPBeginner Support says

      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.

      Administrador

  29. Ralf says

    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.

    • Teemu says

      Yes and no. I succesfully ran a website with “ä” character in there for a few years. But this time this might be the reason why I’m searching help to this problem here with a website that now has the same “ä” character there also…

  30. Don Stewart says

    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!

  31. Jake Phillips says

    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…

  32. Asma says

    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?

  33. Adeshola says

    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.

  34. George says

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

  35. Mirjam says

    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…

  36. Gilbert Stawny says

    If none of the above works, rename your .htaccess file to htaccess.old or something. Try to log in again.

  37. Talha Wahid says

    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’);

  38. Adrian says

    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.

  39. Adnane says

    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.

  40. Howard Bussey says

    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.

  41. Asser says

    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 .

  42. Akash Gadiya says

    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

    • Akash Gadiy says

      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 ;)

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.