We know that Fully Qualified Domain Name (FQDN) consists of hostname.domain.TLD.

Is that hostname also called the subdomain name?  What's the hostname and what's the subdomain name?

  • 1
    It depends on the context. They can be same but usually you use a hostname to reference that specific host while you use a subdomain in the context of web service and such. You only got one hostname but can have multiple subdomains that are handled by that host. In addition a hostname doesn't necessarily have to reflect an actual DNS entry. – Seth Nov 9 '17 at 6:57
  • What's commonly called the "hostname" is the first label of a DNS FQDN that references a specific machine. Just chop off everything after the first dot. – milli Nov 27 '17 at 23:58

DNS allows for arbitrary nesting of labels. There is no requirement that any specific label refer to a specific node.

A "node" is a sequence of labels, where typically, each label indicates a point of delegation.

For example, com and uk are labels designating top-level domains. Within uk there is a static subdomain structure where effectively the "top level" is gov.uk, or.uk, ac.uk, co.uk etc (meaning "top" as in you can't register anything in uk directly, though of course the uk administrators could decide to add new second-level labels). Many countries have this second level, though it is by no means universal (and some countries and domains have yet more internal levels like this).

For example, example.com is delegated by the com top-level domain (also called "zone") to its owner, who can further delegate individual nodes within this domain. So the owner of example.com could decide that there will be a subdomain mail.example.com and it shall contain mail servers whose names could be mx1.mail.example.com, mx2.mail.example.com, etc. This isn't very common in practice, but a really large organization could delegate part or all of its DNS further to individual departments or separate organizations.

(A common example in real life is service providers. If you run a web or email service on example.net you might have ajax.example.net, acme.example.net etc and have each of these delegated to your customers Ajax Inc and Acme Corp. Another scenario is regional services -- na.example.org to serve North America, eu.example.org to serve Europe, etc.)

To finally answer your actual question, whether a node is an actual host (an actual server) or just another level in the DNS is completely up to the organization who owns it. It's not uncommon for a node to have both roles (mail.example.info could be an actual mail server with an IP address, and there could still be a DNS zone containing mx1.mail.example.info and mx2.mail.example.info etc. This is not a very compelling example, I'm afraid, but there is no technical reason you couldn't do this. I'll try to think of a better example...)

A "subdomain" is just an indication that a particular label is below the top level and contains additional nodes within. So, "sub" as in "not top", and "domain" as in "label containing more labels".

The disconnect between the mechanics of DNS (there are "zones" with "labels" identifying "nodes") and the actual real-world semantics (there is a set of root, aka top-level domains, and domains within them which are bought and sold, and subdomains within these which typically are arbitrary subdivisions implemented by the domain owner) is by and large a feature, not a bug. The implementation does not specify any particular policy, and can be used for things which are not currently in any policy. We have seen this spark useful innovations and new policies multiple times.

  • I know at some point somebody had a mail server running on their top-level domain ... If I recall correctly it was somebody@dk but I haven't bothered googling this. – tripleee Nov 9 '17 at 8:42

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.