HOW DOMAIN NAME SERVICE (DNS) WORKS
A lot happens in bits of seconds when we enter a text on a web browser, to when the site is displayed on the device screen. The browser needs to know the IP address of the site we are trying to visit, to direct us to the page. But as humans, it’s impossible to know the IP addresses of all the sites we intend to visit, and computers communicate with other devices or networks using only numbers, they don’t understand human language.
IP address means Internet Protocol address, IP addresses are set of long numbers separated by periods, used for communicating in the networking world, e.g.,-.
Since, it’s easier for people to remember words. The domain name service(DNS) cancels out the need for humans to cram or memorize the IP addresses. Domain names are the names of a particular server or device. They are the names or text we type on the web browser, e.g., google.com, echengbede.com, airbnb.com
DNS makes it easy for humans to communicate with the networking world. It translates the alphabets/words that humans understand and type into the browser to the numbers that devices and networks understand and needs to work with before displaying the web page on the device.
Let’s walk through ABCs of what happens in those bits of seconds, after we type a domain name and the site is displayed on the device
When a text or domain name is entered into the web browser,
A. First, it checks the device cache, to see if the IP address was saved or is still available, since cache has a time value- can be stored for a period of time. If it’s found, the site is displayed on the web browser, otherwise a query is sent to the DNS resolver/recursive server.
However, if a website has changed the IP address, it might cause a problem trying to locate the page, from the device DNS cache, it might pop out an error message like 404 error or a time out.
The recursive server/ resolver is designed to receive queries from the clients’ machine (from our devices) and it is controlled by the service provider, for example, Airtel, MTN, Viasat, HughesNet .
B. Secondly, the recursive server receives the query and checks if it has the IP address, if it was cached previously, otherwise the query is forwarded to the root name server.
The root name server are the servers that keep the DNS system running. They are 12 root name server, ranging from letter a-m and its ran by 12 different organizations.
C. The root server sends the query to the top level domain to check the extensions.
The top level domain server extensions are:
Generic top level domain could end with, arpa, .gov, .mil, .edu, .com, .net, .org, etc., for different sectors
Code top level domain are country’s web page domain name, they end with; .ng, .ca, .uk, .Th, etc.
Internationalized top level domains, they end with dot-com, dot-cn, dot-org.
D. The top level domain directs the query to the authorative name server to check the particular extension
The authorative name server is at the bottom of the chain and acts as the final source of truth.
It stores IP addresses of all sites. It gets all the information; the IP addresses and domain name, when someone purchases a domain name, from the top level domain or from a hosting plan. It stores it up like a phonebook, matching domain names to IP address.
E. The authorative name server provides the IP address, its then stored in the local DNS resolver’s cache, then forwarded to the operating system, then to the web browser and it loads the page on the computer.