I was able to successfully use letsencrypt to setup SSL on one of my domains. However, I tried adding a second domain hosted on the same server but I get a browser error “ERR_TOO_MANY_REDIRECTS” when trying to load the https version of the site.

My server is on DO, Ubuntu 14.04/apache 2.4.7.

I can’t for the life of me figure out why (for example) has redirect errors. The HTTP version works perfectly fine so I believe I have the virtual hosts files setup correctly.

Anyone have any ideas?

1 Like

Is there a redirect to https inside <VirtualHost *:443>? That’s what the letsencrypt client did by default for me. Obviously https should not redirect to https.

1 Like

Holy crap,!!! Yes there was.

Thank you, that fixed it!

EDIT: Thinking about it now. I realize what it did. I copied the to AFTER I setup the firstdomain’s cert…which had the http -> https redirect in it. So when I setup seconddomain’s cert…it copied the redirect lines over to the ssl conf file causing the infinite loop.

1 Like

I’ve got the same problem… but I am not clear on the fix. Can you elaborate?

What needs to be changed to what?

I have:

and www should be just an alias for - it was correctly redirecting from to

Post installation, all have an infinite redirect loop.


@ninedogger @xordspar0

Can you help?

What does " <VirtualHost *:443>" have to be changed to?

In the old working configuration in place of this I had this “<VirtualHost *:80>”.


What does your "<VirtualHost *:443>" say now?

If you post what you have, it will be easier to tell you what's wrong :slight_smile:

The last time I had redirect issues, it was because I'd forgotten a "/" at the end of a line. While the site seemed to work just fine, it caused certbot to fail with an unhelpful message. There are so many subtle things that can go wrong, we'd need to see what you've done first!

Hi Steve,

Before installing Let’s Encrypt it was <VirtualHost *:80> and now it is <VirtualHost: *:443>.

It seems like perhaps the problem is coming from CloudFlare’s Flexible SSL though…



I’m on Nginx (not Apache), but the ERR_TOO_MANY_REDIRECTS was a head scratcher till I read your reply about CloudFlare’s Flexible SSL.

Ended up changing my settings in CloudFlare to use Full (Strict) SSL instead of Flexible and that eliminated the error.


This comment saved me, thank you.

1 Like

This comment about Cloudflare saved me as well. As soon as I changed that setting, everything was a green light. Can anyone elaborate on why this is happening, just for better understanding?

This saved me too, Thanks a lot!

Thanks, saved me too :slight_smile:

Still saving people…