Too Many Redirects

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g., so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command: I sued the certbot https auto configuration tool to renew my certificates, now i get a continuous redirect loop

It produced this output: ERR_TOO_MANY_REDIRECTS

My web server is (include version): Azure - Bitnami wordpress

The operating system my web server runs on is (include version): Ubuntu 16.04

My hosting provider, if applicable, is: Microsoft Azure

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): 0.31.0

After using the https auto config tool I can no longer access my site because of a redirect loop. I suspect this has something to do with an error in the config file, however, I don’t know how to find the config file or how to edit it.

If anyone can help guide me through some steps to diagnose this I would really appreciate it.


Hi @mikebellomusic

yep, you have a loop ( ):

Domainname Http-Status redirect Sec. G 302 0.626 A 302 0.630 A 301 3.180 B 301 3.270 B

It's a https + non-www -> https + www -> https + non-www loop.

	Error two - step - loop

So it's not a http -> https -> http or a direct loop (url -> same url).

What's your preferred version? non-www or www?

Perhaps you have code to create such a redirect - and a .htaccess or something else creates the other redirect.

What tool did you used?

Looks like you have already an older redirect, now the tool has added a second redirect.

Hi, thanks a lot for your reply!

I believe you are correct about already having an older redirect. I was not aware about these redirects, how they worked and that they would not be overwritten until after I used the certbot auto config tool.

The tool I used was: /opt/bitnami/bncert-tool

It is the auto config tool that is recommended on this page:

(I’m not sure if that explains what the tool is, It may have a more commonly used name)

My prefferred version would be the non-www

And yes I think I had modified the .htaccess to include a redirect. would there be a way to remove the redirect that was created from the certbot auto-config tool?

Or is there a .conf file that I should be modifying?

And also, can these modifications be made from the linux console? or would i need to use an FTP client such as filezilla to download the files, edit with notepad and the re-upload?

Thanks again so much for helping me with this, I really appreciate it!

Then the best option: Use only that tool.

Using that tool: Did you select something like "redirect to non-www" or "preferred version is non-www"?

If yes, that's good. Then your wrong redirect may be older and outside of that tool.

Then check your .htaccess to see, if there is the wrong redirect.

I looked into this - bitnami actually hides the .htaccess file by default so I must not have ever changed it. I previously set up my ssl with certbot manually. during that setup is when the redirects must have been set up. Is there any way for me to find out what file specifically is causing the redirects? because I am unsure where to look.

Perhaps in your Apache/nginx - vHost definitions.

That's simple. Check all places. You have to find that redirect.

I’m getting this error:

sudo /opt/bitnami/ start
/opt/bitnami/mysql/scripts/ : mysql started at port 3306
/opt/bitnami/php/scripts/ : php-fpm started
Syntax OK
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address
no listening sockets available, shutting down
AH00015: Unable to open logs
/opt/bitnami/apache2/scripts/ : httpd could not be started

are you able to help me with what it means?

I was able to fix the issues. It was a problem in the bitnami.conf file. Thanks for your help!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.