/
.local

.local

When you enter the name of a computer in a URL or command, the name you enter may be found by calling the currently configured DNS server, or it may be in the “hosts” file on the local machine.

As part of a “no-configuration, it just works” initiative, an Internet standard now reserves the suffix “.local”. Any computer hostname can be turned into a network name by just adding that suffix.

When the name “hatter.local” appears as the name of a computer on the network, Windows, Mac, and Linux (if “avahi” packages are installed) will broadcast a message to every computer on every network to which the current computer is connected by a LAN adapter. The message asks, “is there a computer on the network named ‘hatter’”. If such a computer exists, it will reply to the message and then the two computers can talk to each other.

This works without registering any computer with a DNS server or adding the computer to the hosts table. Computers can discover each other by name simply by being connected to the same network.

However, this does not work if the two computers are not directly on the same subnet, but instead have to go through a router or gateway device.