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. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: mikebellomusic.com

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.

Thanks!

Hi @mikebellomusic

yep, you have a loop ( https://check-your-website.server-daten.de/?q=mikebellomusic.com ):

Domainname Http-Status redirect Sec. G
http://mikebellomusic.com/
52.255.36.168 302 https://mikebellomusic.com/ 0.626 A
http://www.mikebellomusic.com/
52.255.36.168 302 https://www.mikebellomusic.com/ 0.630 A
https://mikebellomusic.com/
52.255.36.168 301 https://www.mikebellomusic.com/ 3.180 B
https://www.mikebellomusic.com/
52.255.36.168 301 https://mikebellomusic.com/ 3.270 B

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

 L	https://mikebellomusic.com/ 52.255.36.168
	301
	https://www.mikebellomusic.com/
	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: https://docs.bitnami.com/azure/how-to/generate-install-lets-encrypt-ssl/#use-the-bitnami-https-configuration-tool

(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/ctlscript.sh start
/opt/bitnami/mysql/scripts/ctl.sh : mysql started at port 3306
/opt/bitnami/php/scripts/ctl.sh : 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 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
/opt/bitnami/apache2/scripts/ctl.sh : 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.