.local


The domain name local is a special-use domain name reserved by the Internet Engineering Task Force so that it may not be installed as a top-level domain in the Domain Name System of the Internet. As such it is similar to the other special domain names, such as localhost. However, local has since been designated for use in link-local networking by RFC 6762, in applications of multicast DNS and zero-configuration networking so that DNS service may be established without local installations of conventional DNS infrastructure on local area networks.

Multicast DNS (mDNS) standard

The Internet Engineering Task Force standards-track RFC 6762 reserves the use of the domain name label local as a pseudo-top-level domain for hostnames in local area networks that can be resolved via the Multicast DNS name resolution protocol. Any DNS query for a name ending with the label local must be sent to the mDNS IPv4 link-local multicast address 224.0.0.251, or its IPv6 equivalent FF02::FB. Domain name ending in local, may be resolved concurrently via other mechanisms, for example, unicast DNS.

mDNS implementations

RFC 6762 was authored by Apple Inc. employees Stuart Cheshire and Marc Krochmal, and Apple's Bonjour zeroconf networking software implements mDNS. Nicholas Valbusa gave a talk on this subject. That service will automatically resolve the private IP addresses of link-local Macintosh computers running MacOS and mobile devices running iOS if .local is appended to their hostnames. In addition, Bonjour devices will use those .local hostnames when advertising services to DNS Service Discovery clients.
Most Linux distributions also incorporate and are configured to use zero configuration networking. By default, each computer’s Avahi daemon will respond to mDNS hostname.local queries, and most shell commands and application program calls that attempt to resolve such names are routed to that daemon by the default hosts: line in the Name Service Switch configuration file. It is also possible to configure the nss-mdns modules and Avahi to resolve hostnames with other pseudo-TLDs.
Although Windows operating systems often do not have built-in mDNS function, it can be added by installing zeroconf software available from Apple and other third parties, and it is beginning to be added in Windows 10.
Finally, many printers and other peripheral devices also implement the mDNS protocol in order to provide simplified connections to them from computers that implement zero configuration networking.

Microsoft recommendations

The connection of Macintosh and Linux computers or zeroconf peripherals to Windows networks can be problematic if those networks include name servers that use .local as a search domain for internal devices.
At one time, Microsoft at least suggested the use of .local as a pseudo-TLD for small private networks with internal DNS servers, via documents that are still accessible. For example, support article 296250 included the following option:
However, more recent articles have cautioned or advised against such use of the .local TLD.
Support article 300684 listed contoso.local as an example of a "best-practice Active Directory domain name", but then added:
which would of course preclude using that or any other domain ending with .local.
Microsoft TechNet article 708159 suggested .local for the exact opposite reason:
but later recommended against it:
TechNet article 726016 cautioned against using .local:
By default, a freshly installed Windows Server 2016 Essentials also adds.local as the default dns-prefix, when a user doesn't select the advanced option. Thus resulting in a domain with.local extension.

Linux

Computers running modern Linux distributions and using the common nsswitch system may have /etc/nsswitch.conf configuration files in which mDNS name resolution was added via the mdns4_minimal plugin to nsswitch. In this configuration, where mdns4_minimal precedes the standard dns option, which uses /etc/resolv.conf, the mDNS resolution will block subsequent DNS resolution on the local network.
hosts: files mdns_minimal dns

or
hosts: files mdns4_minimal dns

This is a configuration choice made by distributions such as Ubuntu/Debian and SuSE and Red Hat, each of which have their own package configuration script that will install the mdns_minimal module as above.
In this way .local requests are being prevented from leaking to the internet, but also block legitimate .local requests for configured DNS servers.

Global DNS queries

As local is an officially reserved special-use domain name host names with this top level label are not resolvable in the global Domain Name System. However, a considerable proportion of the queries submitted to it do specify the domain. Statistics for the L root name server operated by ICANN show that on August 14, 2015, the server received approximately 1331 local queries per second, third in frequency after .com, and .net, or sixth including the invalid gTLDs www, html, and home. On April 12, 2013, the server received approximately 2300 local queries/s, fourth in frequency after .com, .net, and .org.
Historical data from the site are available via the Wayback Machine. In June 2009, for example, the L server received an average of 400 such queries/s, fourth after .com, .arpa, and .net.