Correct domain name for a home desktop Linux machine

43,225

Solution 1

While associating with a domain isn't required, it's still useful to associate with one to avoid problems with hostname lookups of the host in question getting forwarded higher up in the DNS hierarchy. In most cases, having .local as domain is appropriate, as you will most likely be behind a router that does not forward your DNS name. I've also seen some systems use .home in place of this.

.local is considered best-proctice, as a sensible router will not forward requests for hostnames belonging to this domain, so if you for some weird reason have a server named microsoft.com at home, it will be treated locally, seeing as its FQDN will then be microsoft.com.local.

Another approach is what I'm doing since I have various machines and servers spread all over, and at home I use my desktop computer as part of my domain name. My DNS servers has a DNS entry for my desktop, with my router forwarding various services (ssh, mainly) to it.


Also, I find this to be highly relevant, as changing the domain of a server can be more complicated than changing your legal name.:

My sons name was chosen in 5 minutes, but every time I'm setting up a new machine, I've spent days in advance planning the servers name This hostname is going in dozens of remote config files. Changing a kid's name is comparatively easy!

Solution 2

If you won't connect more than a handful of machines at the beginning, but you think it may scale, you can use something in the .local TLD (https://en.wikipedia.org/wiki/.local)

Something like yoursurname.local may be the domain name.

If you don't even think to scale to more than say 10-15 machines, then you don't need a domain name. But if you think you will scale, choosing something non-exotic like the .local TLD will allow you to set up a full DNS server later to reach your machines.

Make sure you read wikipedia's page; the usage of "somethingcustom.local" as a domain is something that has been done in the past, and is still done inside small businesses. Anyway, as you can see from the page, the .local TLD has been reserved for use in mDNS, for host names in the form hostname.local, which may collide with your setup. As per RFC 6762 you MAY use alternative lookup methods (e.g. the custom DNS server I recommend to scale up your network) and the result is up to your ability not to mix up data and names...

Solution 3

If this is a single network, and you do not intend setting up a local mail server or a DNS server that connect to the Internet, then the domain name is of no importance at all and can be left as blank.

The domain name only serves to combine with the host-name to create the the fully qualified domain name (FQDN) of the system. For example, if the domain name is company.com and the host name is host1, then the FQDN is host1.company.com. You will still need to setup a DNS server to resolve that name to an IP address, or have some Internet DNS server point to your network.

Without a domain name, the computers can still be identified on their network by their host-name.

Since this is a home desktop being attributed a local IP address via DHCP, a blank domain name is entirely appropriate. Specifying a domain name would have no effect at all in that case.

For more info see Wikipedia : Fully qualified domain name.

Share:
43,225

Related videos on Youtube

nebuch
Author by

nebuch

Updated on September 18, 2022

Comments

  • nebuch
    nebuch over 1 year

    I have several machines running Debian, and during install, I left the domain name field blank. This hasn't affected anything so far, but I'm curious what the correct thing to set that field to is if you don't have a registered web domain and your IP is dynamically set (http://www.whatsmyip.org/ gives a different IP every few months). Apologies if this is a newb question, but I can't find any results via Google.

    What is the proper domain name for a home desktop with a dynamic IP address?