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?
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:
In your example above, you would resolve
.tk
astk.
to ensure it's unambiguous. Interestingly this actually does have a valid A record.EDIT: RFC1535 has another interesting quote:
In ACM Queue, I defined FQDN as follows:
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 [email protected] in 1988-1993, it was possible to send mail from [email protected] to matt@decvax and have it expanded to [email protected] and [email protected] 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.
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.