Don’t use .local as an internal TLD

Recently, I was having issues with internal DNS names, I had spent some time using the .local top level domain name (TLD).

I’d been content with the .local domain name for a good while, because it worked on Windows, but I found that when using the domain names on Linux and Android it would not work in a browser.

It turns out .local is used for in link-local networking. Often for something called mDNS, which I admit I don’t know a lot about.

So if you have been content connecting to your internal domains using ca.local, octoprint.local, proxmox.local I have bad news for you, these domains aren’t going to work much longer.

Windows Command Prompt pinging proxmox.lan and proxmox.local
Windows Command Prompt pinging proxmox.lan and proxmox.local

Changing .local Domains on EdgeRouter

What I did to fix this was login to my EdgeRouter X and change all of the references from .local to .lan. Although I cant promise .lan won’t one day be victim to the same fate.

If you have an EdgeRouter X its easier to bulk edit the domain names using the config tree, although make a note of your configuration, because it won’t be preserved if you alter the parent node of each configuration item (so you’ll loose aliases).

Config Tree > system > static-host-mapping > host-name 
> Host name for static address mapping 

Remember to commit your changes.

Can I alter DNS for my devices without a DNS Server?

If your DNS isn’t under your control, you won’t be able to configure how it responds to queries, there are some hacks and tricks to get around this, such as editing your hosts file.

Using the hosts file works fine, but DNS can become complicated quickly. Especially if there are many devices.

For best results it is best to configure your DNS as required, rather than making edits to each device’s configuration.

Editing your hosts file may also not be possible on Android devices for example, or TVs.

You don’t have to use .lan for a TLD, it is probably best practice to register a domain, and then use everything you need as a subdomain of that domain, as is typical of larger networks and allows for segmentation.

Aidan.