Wrong public address displayed

I changed my DuckDNS address today in Home Assistant under the DuckDNS Configuration. I can successfully log into https://new-dns.duckdns.org:8123 and the certificate is valid.

The problem I have is, if I install Home Assistant on a new iOS device and open the app (on my local network), it automatically finds a server at the old https://old-dns.duckdns.org:8123 address, which obviously fails to connect.

I can manually enter the updated server address and it works but I’m trying to figure out why the old address is still detected. Where should I look to fix this?

DNS servers on the internet, which are the servers holding the translation lists from domain name to IP, are often copied to spread out the load.
Your ISP for your iOS device might have made a copy of the translation list for your host when you used it earlier.
To make sure this is not a persistent problem the DNS servers have timeouts set for how long other non-authorative DNS servers may store a copy, but there is no rule that DNS servers only store copies from the authorative servers, so you might have a copy of a copy of copy of a copy on your DNS server that your iOS device use and each copy come starts their timeout counter from 0.
The general estimation on how long these DNS copies last is 3x the timeout of the authoritative zone.

There is no way to really control this. You might have a little control, if you have administrative rights to the DNS servers for the domain name, since you can then lower the timeouts to make copies expire faster, but it is unlikely that you have administrative rights to duckdns.org. :slight_smile:

In other words all you can do is pretty much wait.
You might be able to delete a copy on your iOS device by restarting it, but if the DNS servers are not updated when you do that, then it will just copy the wrong data from its DNS servers again.

Okay thanks! I’m fine with waiting if its just a DNS thing, I though maybe I had misconfigured something somewhere in Home Assistant, thanks for clarifying!

DuckDNS seems to have pretty low timeouts, so within 30-60 minutes it should be all updated.
If not the restart your iOS device

After 8 days the issue remains and since then my public IP address has changed (and duckdns has updated it).

Any other ideas?

try deleting the server and re-add it?

go to:
configuration/ companion app/ [server] and hit ‘delete server’ at the bottom

Sounds like your local DNS is bugged then.
If your router is acting as local DNS, then try restarting it.
Also restart the iOS device, al though, if the device had not been connected to HA before, then it should not hold a copy of the record and therefore it should have pulled it from the local DNS.

And if that does not solve it, then clear your DNS on your client machine and use that for error checking the DNS chain.
If it is windows then open a cmd window as administrator and run “ipconfig /all” to clear dns.
Then ping your HA address and see if you get the old or new address.
If you get the new one, then your local DNS is updated and OK and the issue must be on the iOS device.
If it is the old one and you already have restarted the router, then you probably have an issue further up the chain and you need to search for it.

You have a command line tool called nslookup that can be used to query specifik DNS servers and once you areworking with internet-located servers, then you might also be able to use online sns tools to do the search.

@aceindy I’m not even logged in on the device in order to delete a server.

@WallyR
I’ve rebooted the router (even changed it’s DNS to another provider).

I just grabbed another iOS device I haven’t used in months and its never had Home Assistant installed before, when I open the app for the first time I get a prompt asking to check my local network for servers which I allow and then it finds the server at the old address.

It really seems like Home Assistant on my network is broadcasting the old address.

Apple products are weird and you might have some bonjour, mdns or zeroconf server running on a device that have stored that info.
In that case you need to shutdown everything in your network and start it again once nothing is running.
Alternatively you could type in the address manually in the companion app.

Yeah typing in works fine so this isn’t a huge deal I just though HA had something messed up but you could be right about Apple being weird.