Most people understand what a domain name is. For example, www.google.com is a domain name. In this example, the domain name has three components.
For our discussion, a domain name is read from right to left. “com” is called the top-level domain. “google” is called a subdomain of “com”. In return, “www” is a subdomain of “google”.
The limitations of a domain name is that the entire name can have up to 253 octets (characters), and up to 127 levels of top level domain and subdomains. Furthermore, each subdomain (a label) can only have up to 63 octets (characters).
If and only if a domain name has an IP address associated, it is also called a hostname.
The existence of DNS domain name system is to help resolve domain names to their associated IP addresses. This makes it possible for people to use domain names that are easy to remember instead of IP addresses.
Another purpose of DNS is to use domain names as an abstraction level. This makes it possible to change the IP address of a host without requiring everyone to update what they know about the host.