What is the canonical name for domain names with extra parts?

I am confused about domain names (I think)

I call these things, i.e. names you can buy, 'domain names'

bbc.co.uk
google.com

I call these things, i.e. extensions of names 'host names'

www.bbc.co.uk
mail.yahoo.com
arts.mit.edu
hello.there.example.com

Is this naming scheme correct? Are there official definitions of these?

In particular, what are each of the texts between the dots called (i.e. the name for "www", "bbc", "edu", "example")?


Solution 1:

All of those entries are domain names per RFC 1034 and RFC 1035. If they also had the (typically implicit) trailing dot that represents the root they would be fully qualified domain names.

The individual components of a domain name are called labels. These cannot exceed 63 characters in length. A label can include any octet from \000 to \377.

If a domain name has an A (or AAAA) record associated with it (or a CNAME that ultimately resolves to an A / AAAA record) then it is also a hostname. Your three real examples (www.bbc.co.uk, etc) all qualify.

Special rules apply to hostnames. In particular, every label in a hostname must adhere to the RFC 1123 requirements, i.e. they can only use letter, digit, or hyphens, and hyphens cannot be the first or last character.

Please note that the leftmost label is not a DNS hostname in its own right, although it could be a local (non-DNS) hostname.

Solution 2:

The right-most object is the Top Level Domain. Everything to the left of a TLD is a subdomain. If there is an address associated with the very left-most object it is considered a hostname.