What hostname do you use for server? home.box or home.local?

zephyr@lemmy.world to Selfhosted@lemmy.world – 35 points –

There are many DNS names options. Which one do you use?

70

You are viewing a single comment

According to IETF, you should only use .intranet, .internal, .private, .corp, .home or .lan for your private network ( RFC 6762 Appendix G ). Using other TLDs might cause issues in the future, especially since new gTLDs seems to show up every few months or so, which can collide with the TLD you use for your local network.

A problem with the .lan TLD (maybe others from this list) is that web browsers do not consider it a TLD when you type it in the address bar, and only show you the option to search for that term in your default search engine. You have to explicitly type https:// before it, to have the option to visit the URL.

E.g type example.com in the address bar -> pressing Enter triggers going to https://example.com. Type example.lan -> pressing Enter triggers a search for example.lan using your default search engine.

Little known trick--or perhaps everyone knows it and is quietly laughing behind my back--with Chromium browsers and Firefox (and maybe Safari, I'm not sure), you can add a slash to the end of an address and it will bypass the search.

So, for example, my router on the LAN goes by the hostname "pfsense". I can then type pfsense.lan/ into my address bar and it will bring me to the web UI, no HTTP/s needed.

@redcalcium
Really? Not .local? Why is it the default on so much?
@zephyr

A long time ago Microsoft and some teaching sources used .local in example documentation for local domains and it stuck. Like contoso.com was Microsoft's example company. I was taught to use .local decades ago and it took a very long time to unlearn it.

I can vouch for the fact that .local stopped working suddenly in most browsers a year or two ago, I was forced to migrate to .internal