Problem with letsencrypt

I’m setting up a new homeassistant and everything was ok until I tried to use letsencrypt and ssl.

The server fails to start, if I check status on the service it says the following:

CGroup: /system.slice/system-home\x2dassistant.slice/[email protected]
└─1860 /root/homeassistant/bin/python3 /root/homeassistant/bin/hass -c /root/.homeassistant

sep 20 00:05:10 homeassistant-debian hass[1860]: ssl.SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:1056)
sep 20 00:05:10 homeassistant-debian hass[1860]: 2020-09-20 00:05:10 ERROR (MainThread) [homeassistant] Error doing job: SSL error in data received
sep 20 00:05:10 homeassistant-debian hass[1860]: Traceback (most recent call last):
sep 20 00:05:10 homeassistant-debian hass[1860]: File “/usr/lib/python3.7/asyncio/sslproto.py”, line 526, in data_received
sep 20 00:05:10 homeassistant-debian hass[1860]: ssldata, appdata = self._sslpipe.feed_ssldata(data)
sep 20 00:05:10 homeassistant-debian hass[1860]: File “/usr/lib/python3.7/asyncio/sslproto.py”, line 189, in feed_ssldata
sep 20 00:05:10 homeassistant-debian hass[1860]: self._sslobj.do_handshake()
sep 20 00:05:10 homeassistant-debian hass[1860]: File “/usr/lib/python3.7/ssl.py”, line 763, in do_handshake
sep 20 00:05:10 homeassistant-debian hass[1860]: self._sslobj.do_handshake()
sep 20 00:05:10 homeassistant-debian hass[1860]: ssl.SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:1056)

I have tried to change the security settings for the certificates in /etc/letsencrypt/live but with no luck. If I comment out HTTP in configuration.yaml then it’s ok again.

I’m having my own domain, so I’m not using duckdns. I successfully got this to work at another site.

Any ideas what I have done wrong?

The problem was actually caching in Chrome. It tried to user http instead of https. When i tried another browser it actually worked, then i forced https in chrome and it was ok.