A domain name is a name like "example.com, which you buy from a domain name registrar. Subdomain names have a prefix added to the domain name, like "www.example.com" or "ftp.example.com". Normally, when you host your domain with a web host, the latter will create a number of subdomain names for your domain, like "www.example.com", "mail.example.com", "ftp.example.com" and so on, each with a different function. Domains and subdomains are often assigned to a particular address and machine on the internet. Each of these addresses/machines have at least one hostname, which may be "example.com" or "www.example.com", etc. Different hostnames may even share the same address and computer.