Too many redirects after enabling https

AI-generated summary

The user KevinWorkman encountered a “too many redirects” error after enabling HTTPS on their Discourse forum using Let’s Encrypt. After troubleshooting, they discovered that the issue was caused by uppercase letters in their domain name (forum.HappyCoding.io). pfaffman suggested using the discourse-doctor tool, which revealed the configuration issue. KevinWorkman resolved the problem by correcting the domain to lowercase (forum.happycoding.io). The discussion also led to suggestions from codinghorror and pfaffman to add warnings or automatic lowercase conversion in the setup process to prevent similar issues.

I’m trying to enable https on an existing forum using this guide: Set up HTTPS support with Let's Encrypt

I ran ./discourse-setup and entered my email address for Let’s Encrypt, and then rebuilt the app.

However, now when I visit my server I’m getting this errors:

forum.happycoding.io redirected you too many times.
ERR_TOO_MANY_REDIRECTS

I’ve manually inspected app.yml and it appears that all of my settings are correct. I’m not using cloudflare or anything.

Is there a step I’m missing? Is there something special I need to consider when running my discourse on a subdomain?

As always, thanks for your time, and I appreciate any help anybody can offer!

I’m not sure what the problem could be. Could you try the unannounced discourse doctor and see if it sheds light?

git pull
./discourse-doctor

As always it turns out that I’m an idiot. I had some upper-case letters in my domain (forum.HappyCoding.io). Modifying the app.yml file to only user lower-case letters (forum.happycoding.io) solved the problem.

I noticed this when I looked at the output for disocurse-doctor, so thanks very much!

Btw, I found a similar thread with a similar problem here.

Great! That’s what it’s supposed to do!

Was it just printing the configuration information or was it something else?

Yeah, the discourse-doctor tool printed out the config data, which is where I saw the upper-case letters. That coupled with seeing this post and remembering encountering another problem with upper-case letters finally clicked everything into place in my brain.

Maybe you can extend doctor to warn, or we can add a stop warning in setup, when people put uppercase characters in the domain name?

Or launcher could downcase the domain main name.

Sure, whatever works and is easy!