8

I tried to search to Internet for a definition of a FQDN. Wikipedia says, a FQDN

specifies its exact location in the tree hierarchy of the Domain Name System (DNS) I would interpret this, that it's unambiguously resolvable (in DNS).

The example at WP (tough I don't want to use this as reference) states the use of hostname.example.com.

The RFCs I found (RFC 1035 was the only not-protocol-specific I found) were not informative on what does a FQDN qualify.

I thought that only an identifier like hostname.example.com is a valid FQDN (including all hostname, domain and TLD in separate), but this seems to be wrong.
Is it needed that a FQDN should always include a hostname beside the domain, even if the domain consists of only one host? Or is the only definition that a FQDN should be resolvable via DNS? E.g. the domain .tk is unambiguously resolvable, is this a FQDN?

sebix
  • 4,175
  • 2
  • 25
  • 45
  • I find this an interesting question, but if you're planning on answering it, please note I'd **much** prefer to see answers that are referenced. Unless you're Paul Vixie, I'm not hugely interested in a simple statement of your opinions on the subject. – MadHatter Jul 01 '14 at 09:45
  • 2
    Well, I guess I _am_ Paul Vixie, so I'll take a stab at answering this, below. – Paul Vixie Jun 03 '16 at 06:31

3 Answers3

6

I would consider a name to be fully qualified if you do not have to append any further identifiers to unambiguously resolve the host. If this is not true, then the name would be considered relative.

RFC1535 discusses an important point:

An absolute "rooted" FQDN is of the format {name}{.} A non "rooted" domain name is of the format {name}

In your example above, you would resolve .tk as tk. to ensure it's unambiguous. Interestingly this actually does have a valid A record.

$ dig tk.
; <<>> DiG 9.8.3-P1 <<>> tk.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 812
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;tk.                IN  A

;; ANSWER SECTION:
tk.         20  IN  A   217.119.57.22

EDIT: RFC1535 has another interesting quote:

Further, in any event where a "." exists in a specified name it should be assumed to be a fully qualified domain name (FQDN) and SHOULD be tried as a rooted name first.

GeekyDeaks
  • 206
  • 1
  • 5
4

In ACM Queue, I defined FQDN as follows:

The DNS namespace has a tree structure, where every node has a parent except the root node, which is its own parent. Nodes have labels that are from 1 to 63 characters long, except the root node whose label is empty. A domain is a node in context, and a fully qualified domain name has a presentation form that is just the node names, bottom up, with each followed by a period (.). For example, www.google.com is the fully qualified name of a node whose name is www, whose parent is google, whose grandparent is com, and whose great-grandparent is the DNS root.

Any time you use terms like "host name" or "host part" or "domain part" you are off in the weeds and you'll find that no definition of FQDN quite fits your purpose. The meaning, rather than the definition, of FQDN can be made clear by considering its antonym: the non-fully qualified domain name. To be fully qualified means you're specifying all domain labels up to the top level, and you could in that case append a final dot (.) to indicate that you've done so. To be less than fully qualified means that the name you're looking at only makes sense within the context of a search-list or default-domain.

RFC 1535 was interesting because a lot of us had up until that time used multi-label local names and still expected search-list behaviour -- and this broke too many other things, so was outlawed. But when I was postmaster@dec.com in 1988-1993, it was possible to send mail from vixie@cognition.pa to matt@decvax and have it expanded to vixie@cognition.pa.dec.com and matt@decvax.dec.com and it all just worked. Turned out we had to give that up. These days if there's a dot in your presentation-level name (that is, you typed it or a program displayed it), it's presumed by all the software in the world to be an FQDN.

My Sendmail book (co-authored with Fred Avolio after we'd both left DEC.COM) also has a chapter on this topic, which is interesting reading since it was written at the same time as RFC 1535.

Paul Vixie
  • 1,144
  • 1
  • 11
  • 10
0

My 2 cents:

In the strictest sense a FQDN is what your wrote in your example.

i.e. hostname.example.com.

including the dot at the end.

I don't think it has to be resolvable via DNS, it's just a syntaxical definition.

Aditya K
  • 871
  • 3
  • 13
  • 24