background: I was using local as my local domain until recently when I learned this is a bad choice. So I changed my local domain to lan. However, my devices were all configured to homeassistant.local which was no longer reachable. By now I have changed everything to the IP. Still I was curious to find out why I had issues with mdns
I am using the same local domain as my global domainā¦
In other words, https://home.assistant.priv works from everywhere; local or external doesnāt make any difference (and, yes, by means of my own DNS server
)
The issue seems clear if you understand how mDNS works. When you make a request via regular DNS whatever client you are using sends the request directly to the server to get a result. mDNS works different in that the request is sent as a multicast UDP packet and hence all machines on your network see this. Think of it this way:
Regular DNS: Where can I find my-printer.local
mDNS: Does anyone here have the name my-printer.local
You say that you have installed avahi daemon with reflector enabled, so you have already got mDNS multicast packets going across from one network to another. You have then put Home Assistant on both networks, so in essence when a client makes a requests Home Assistant responds on both networks - once directly on the same network and a second via the reflector - in essence giving the client 2 different IP Addresses to connect to.
My recommendation would be to not multi-home Home Assistant - it was never designed to work that way. Keep it on a single network and use the MDNS reflector to allow the UDP Multicast packets across.
Also, donāt just pick and name for your local network. Use the ā.internalā domain since that has now been reserved specifically for this ( .internal - Wikipedia).
We will have to see if it is accepted this time.
It have been suggested a few times before and it was never fully ratified.
I was resolved: Approved Resolutions | Special Meeting of the ICANN Board | 29 July 2024
There is also Home.arpa | Local Network Naming
ICANN manage the TLDs, but IETF needs to elevate it to a standard, which is what have failed before.