What is Domain Name Servers? How it works?

Domain Name System (DNS) servers distribute the job of mapping domain names to IP addresses among servers allocated to each domain or we can say it is used for converting host names and domain names into IP addresses on the Internet or on local networks that uses the TCP/IP protocol.

When a Web site address is given to the DNS either by typing a URL in a browser or behind the scenes from one application to another then DNS servers return the IP address of the server associated with that name.

The DNS system is a hierarchy of database servers that start with the root servers for the top level domains (.com, .net, etc.). The root servers point to authoritative servers which reside within ISPs and companies that resolve the host names to complete the name resolution.

Example “WWW.ORGANISATION.COM” where WWW is the host name and ORGANISATION.COM is the domain name. The domain name is the company’s identity on the Web and the host name is the name of the actual Web server within that domain.

Each second level domain must have at least one domain name server responsible for maintenance of information about that all domains and response to queries about those domains from other computers on the Internet.

Advantage of the network of DNS servers is that domain names stay the same even when IP addresses gets change, and so the domain name servers can transparently take care of the mapping.

How Domain Name Servers Work?

If you want your computer to access a domain like “www.myinternet.com” the DNS works like this:

  • Your computer will ask your default DNS server if it knows the IP address for www.myinternet.com. If the DNS server has been already asked that question recently, then it will have the answer in its local cache and can answer immediately.
  • Otherwise, your DNS server will queries the central zone files for the address of the primary domain name server for “myinternet.com” and is answered with something like “ns1. myinternet.com”.
  • Your DNS server will ask DNS server of the myinternet.com for the IP address of www.myinternet.com, then will look up the answer and send it back.
  • Your DNS server will store the IP address that returned in its local cache and make the address available to your computer.
  • Your computer will then contacts www.myinternet.com with standard Internet routing protocols by using the returned IP address.

So, we hope that now you understand more about DNS and its work.