As far as I know, A fully qualified domain name (FQDN) consists of two parts:
The hostname part: A single label representing a machine belonging to one specific domain.
The domain name part: Multiple labels joined with dots and representing the domain, which is basically a group of machines.
Normally, only with a FQDN can we visit a particular machine on a particular network from outside. We can't do it with only either the hostname part or the domain name part.
For example, the www.google.com
FQDN specifies the hostname part as www
and the domain name part as google.com
. And with this FQDN we can visit a machine in the google.com
domain.
It all looked nice until I came across a FQDN which also functioned as a domain name in an experimental environment manually set by others. Here is the procedure I have went through :
I opened Wireshark and started capturing packets.
I visited
cool.com
using my browser.The web page was successfully loaded. And Wireshark captured something. It showed that when my local DNS server asked upper level domain name servers the IP address of the
cool.com
server, it was led to the authoritative name server of thecool.com
domain, which wasns.cool.com
. And this authoritative name server replied with the IP address of thecool.com
server.The authoritative name server was shown in a NS type resource record with key
cool.com
returned by some upper level domain name server. And the IP address of thecool.com
server was shown in an A type resource record with keycool.com
returned by the authoritative name server, i.e., byns.cool.com
.Examining the headers of the HTTP request sent to
cool.com
later, I made sure my browser was not playing tricks like automatically extendingcool.com
towww.cool.com
. So I was actually paying a visit tocool.com
.
My question is, why the cool.com
domain name can itself be a FQDN in this case? I hadn't defined the hostname part yet. The boundary between a FQDN and its domain name part seems blur...
Is it up to the network administrator which machine I would end up visiting or something? Thank you so much if anyone gives me an explanation!