Hostname vs Domain Name

Hostname vs Domain Name

In layman terms.

What is the difference between hostname and domain name?

Hostname - name given to the end-point (the physical machine you are using)

  • Used to identify machine over DNS, if configured
    Domain - name given to the network
  • Used to reach the network from an external point i.e. the internet

Hostname and Domain Name syntax

hostname.domain.com
Real-life Example
If say you have a company branch called NKN-Nairobi, and it's domain is called nknNairobi.com A machine on the company branch network called myhost would be addressed as, myhost.nkn.com
If you were connecting to this machine externally, you would address it with that full name.
The domain part would reach you to the company network and the hostname would let you reach the exact machine in the campus.