I have HA set up with duckdns, like this: https://xxxxx.duckdns.org/
This has worked just fine for months.
Then suddenly today it stopped working. I think this may have happened when I updated Unifi OS (router) to 2.2.12 https://homeassistant.local:8123/ works just fine, but external https://xxxxx.duckdns.org/ shows up with a self signed certificate from UbiquitiRouterUI.
I ended up reinstalling HA and loading a backup from 1 day ago. I also restarted my UniFi Security Gateway. Not sure which one did the trick, but it’s now working again.