Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 http://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?

share|improve this question

closed as not constructive by MDMarra, Shane Madden, Alex, Sam Jul 29 '11 at 21:22

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.

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 Answer 1

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.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.