Hacker News new | ask | show | jobs
by Dathuil 971 days ago
I ran into this issue a few months ago when I got sometime to actually setup my home server and wanted to use urls like nas.local and homeassistant.local on my home network to make things easy for my family to access.

Worked fine on windows but all the Apple devices in the house had a conniption when trying to connect. I ended up just using my personal domain replacing .local. Am currently investigating a wildecard DNS SSL cert to get HTTPS working on the LAN, but that's more out of curiosity than anything else

1 comments

Why bother with the .local suffix? Just do the device's DNS name itself. http://servername/ should work fine, clients register themselves during the DHCP handshake and the router's DNS server records the name.
Not always, and in many cases the OS is actually adding .local or .[your domain] automatically
Which OS? My home network works perfectly fine this way and I have or had Windows, Linux, BSD, and Mac.
> clients register themselves during the DHCP handshake and the router's DNS server records the name.

This is not always true as it’s a feature of the specific router and not part of the spec. To be fair, it’s a feature that’s now fairly common because of how handy it is.

Additionally; many flavours and types of operating systems transparently handle local discovery and resolution just not all of them.

For anyone looking to test this, open a terminal and ping the short domain. In the response it will show what domain it actually used. In my case ‘ping proxmox’ shows ‘proxmox.<my personal domain>.com’.

This is entirely pedantic but I think interesting if you have a mind for optimizing: The discovery/search does introduce some delay.

That’s very dependent of your home network setup. Many consumer grade routers use dnsmasq behind the scenes which handles that for you by default. Once you get out of the consumer grade aio routers it’s much less likely to work out of the box.