-1

Why is it that

All hostnames are domain names, but not all domain names are hostnames.

Source: http://answers.yahoo.com/question/index?qid=20070820080918AA2kINu, also quoted as an answer in https://superuser.com/questions/59093/difference-between-host-name-and-domain-name

Shouldn't it be the other way round? All domain names are actually host names but not all hostnames are domain names?

Pacerier
  • 521
  • 16
  • 35
  • 2
    Since this is closed (wrongly, in my opinion), I'll answer in a comment. A **hostname** is a fully qualified name that contains a **host part** and a **domain part**. The host part is the leftmost token. The rules for the host part differs from the other parts -- the host part can't be numeric, for example. So 1.example.com is not a valid host name, but it is a valid domain name and host.1.example.com is both a valid host name and domain name. – Jakob Borg Jul 29 '11 at 21:40
  • Hostnames are only fully qualified if they're fully qualified hostnames, otherwise they're just hostnames. There's no requirement for a hostname to have a domain component, it's still a hostname without it. i.e. fred.example.net is a fully qualified hostname, fred is the hostname. People might refer to fred.example.net as a hostname and that's valid, but it's not a requirement to have a domain component. – EightBitTony Jul 29 '11 at 23:49

1 Answers1

4

A domain name is a container for other types of data, or a structure for administrative control. A hostname is a specific label for a specific computer. A fully qualified hostname is a hostname plus the domain name in which it sits.

Domain names and hostnames are neither the same, nor are all of one of them the other kind. They're entirely different things with different roles.

Without a Domain Name System in which domain names exist, you still have hostnames.

EightBitTony
  • 9,311
  • 1
  • 34
  • 46