What is Resolving Host or Domain Name?
Resolving host or domain name is a process of mapping a text to a unique number in order to connect and get the required information from the web server. Here the text is domain name entered as part of URL in the address bar and number is the IP address of a webserver in which the information is stored.
We will explain this article with site address www.google.com as an example. In simple terms the site address is nothing but a domain name. Here, com is a top level domain, Google is subdomain of com and www is subdomain of Google. A domain name associated with an IP address is called host name.
Understanding IP and domain name
Open a web browser (Google Chrome is recommended) in your computer and type the address www.google.com and press enter which will open Google’s website. Open another browser tab or window and type this number 184.108.40.206 in the address bar and press enter. Surprised!!! Yes this will also open the same Google’s site.
So what’s the catch? Every domain name (site address) is mapped to a number called Internet Protocol (IP) address in the internet. Entering the domain name google.com will be mapped to the server’s IP address 220.127.116.11 and then the browser will try to contact that IP directly to get the required information using Hyper Text Transfer Protocol. It is very difficult for us to remember the IP numbers and hence the domain names are used for the purpose of ease and resolving host is nothing but the process of getting that unique IP address number.
Some browsers by default shows the domain name, IP address and server location of the site in browser’s address bar. Browser plugins can also be used to display these details whenever you open any site.
How does it resolve?
Well, again we will explain with simple example of using Windows 8 and Google Chrome browser. Open network and sharing center and go to the properties of TCP/IPv4 or TCP/IPv6 whichever you use. You will see two sections one for obtaining IP address for your computer from ISP whenever it is connected to the internet and the other is to obtain a DNS server from ISP.
Now choose the manual DNS server option “Use the following DNS server addresses:” and enter junk value for preferred server as 1:1:1:1 for TCP/IPv4 and 2000:2000:2000:: 2222 for TCP/IPv6 and leave alternate server details as blank. Click OK to save your entries.
Open chrome browser, type google.com and press enter. You will see a “Resolving host…” message for some time and then the web page not available message.
Now type the IP address 18.104.22.168 and press enter, Google site will open much faster (faster than opening google.com with correct DNS).
Got it? The DNS servers do the necessary action to get the IP address of a host or domain name you entered in the browser. Preferred server works as a primary server and the alternate server is used when the primary server fails.
How the complete communication works?
When an URL is entered in the browser running on a local client computer, the browser gets the DNS server details from the network settings of your computer. DNS servers will have the required mapping of domain names to IP address and work like a network structure in hierarchy.
If the first DNS server does not have the mapping it will request the next level DNS server 2. This will continue till the time the IP address is obtained and the same is returned to the browser. (You will see a resolving host message till the time browser gets the IP address of the site you entered).
DNS Caching is used in every level including Chrome browser and your local PC or mac in order to save time during this resolving host process. This means browser and DNS servers cache the IP address of the host names and use it when the same request is requested next time though the real mapping is not available. Here is another issue of IP change, if the IP is changed for a particular site you try open then the cached IP returned by the DNS servers will not match with the new IP of the site. Again browser will try to resolve the host till the time it gets the correct IP.
This whole communication happens through TCP/IP protocol structured in every computer. Once the IP address is known, the browser will directly broadcast request to the server through Hyper Text Transfer Protocol (HTTP) and get the required HTML code of the webpage. The codes are then interpreted by the browser to display it in a readable format and you see an attractive webpage.