DNS is short for Domain Name System
During the early days, people/computers use IP addresses for communications,
just like you have to get your friend’s phone number to call him.
Every host on the network has a unique IP address.
For example, 220.127.116.11 is one for CNN.com
But IP addresses are bad for humans to remember and tell each other, so we need something that makes some sense to humans. Here is how Domain Names come into play.
You may think domain names as an Internet phone book.
Just like your phone book may have entries like:
You can imagine Domain Name entries like:
Although this host-address mapping method was true for the very early days, modern DNS (Domain Name System) is a little bit complicated than that.
DNS Resource Records:
DNS stores four types of records, type A record, NS record, CNAME record, and MX record.
Tpye A record stores IP address where the domain name points to.
NS record is name of the DNS name server for the domain.
CNAME record is also called Alias record, which holds the canonical name to requested domain name.
MX record stores its mail server with priority specification.
Here is a screenshot to lookup jjpro.net.
In the answer section,
The A record tells that the website jjpro.net is hosted on the server whose IP address is 18.104.22.168;
NS records show that jjpro.net has two name servers, which are ns1.bluehost.com and ns2.bluehost.com;
MX record says that the mail server for jjpro.net is mail.jjpro.net, with priority of 0. (Google has multiple mail servers, and you will be brought to the one with the highest priority when you go to gmail.com. Lower number indicates higher priority.)
Here is the screenshot to lookup www.jjpro.net:
As you can see, www.jjpro.net only has a CNAME record, and tells it is actually an alias name to jjpro.net