How to Disable Nginx Port 80 Redirect

Hi!

Preface: I’m pretty new to HA (6 days in) and I love it! But it’s a steep learning curve, so please excuse me, if this is a dumb question and has been answered before… :wink:

So I’ve installed the Let’s Encrypt addon, got my cert and automated the cert renewal with this handy blueprint: Let’s Encrypt Renewal. Then I installed the Nginx Proxy addon listening on port 443, setup port forwarding in my router/firewall (pfSense) from port 4433 to port 443, since port 443 is already taken by another service running on the same IP, so HA is accessable from the outside world at https://ha.mydomain.com:4433. So far so good, it’s working nicely.

The problem is that Let’s Encrypt needs port 80 for validation (unfortunately there is no DNS validation for GoDaddy available), but when I try to access http://ha.mydomain.com:80 I get redirected to https://ha.mydomain.com:443, which in return ends in the other service mentioned before.

I’m a bit puzzled now why this is happening, because the Nginx Proxy addon documentation clearly states “By default, port 80 is disabled in the add-on configuration in case the port is needed for other components or add-ons”, but apparently this is not the case.

So my question is: How can I disable this port 80 to 443 redirect in Nginx?

Thanks!

1 Like

That is most likely the doings of your browser and not NGinx
No answer on port 80 (HTTP), then try port 443 (HTTPS).

1 Like

Are you using Chrome, by chance? A recent update seems to have automatically turned on forced HTTPS redirection. You can turn it off in settings, or an incognito window seems to also avoid it — or using a different browser, I suppose. :smiley:

1 Like

@WallyR @RMoRobert

Thanks a lot, you’re both absolutely right! I’m using Firefox but I couldn’t find a way to disable this annoying safety feature. In Chrome it was possible to disable redirects following this guide: https://howchoo.com/chrome/stop-chrome-from-automatically-redirecting-https (I also had to clear the browser cache).

Good to know that my setup is actually working as it’s supposed to. Thanks again!

In firefox you probably have to find it in about:config

Try to do a search on https

1 Like

Found it, thanks! In about:config search for browser.fixup.fallback-to-https and set it to false. Additionally you have to clear the browser cache (Settings → Privacy & Security → Clear History).

A tool like this also does the job: https://wheregoes.com/