What is DNS (Domain Name System) | Explained
Recently, my friend I was working on revamping our tech blog and migrating to a new server. This means, not only migrating but also pointing the domain names to the right server. Interestingly, this made me write a small note explaining the DNS (Domain Name System). Many of us are either curious or do not know what happens in the background of DNS queries.
What is DNS (Domain Name System)
Whenever someone types a website address (e.g.: “www..com”) in the web browser, the Computer system will directly communicate to the configured DNS server of the computers cache itself for the IP Address of the website. Upon successful communication, website is returned and visually displayed on the web browser. This translation process of .com -to-> ip-address is handled by DNS (Domain Name System). This system was implemented so that users browsing the internet remember the website names (also called Fully Qualified Domain Name, FQDN) than a bunch of numbers. Imagine if you have to memorize all the IP addresses of your favourite websites. Impossible, isn’t it? Besides, IP addresses tend to change depending on the website you are trying to reach and how they are architectured.
You can witness the IP address of any website by using the “PING” (also called ECHO) command. This is a universal command across any computer system, only the tool used to reveal this may differ. E.g.: Command prompt on Windows, Terminal on Linux/Unix/MacOS.
You simply have to key in “ping website-address.com” to reveal the details (image below).
How DNS works
Every client system must be configured or offered with a DNS server. This DNS server is responsible and knows the rest of the public DNS servers located around the internet. Generally, your ISPs (Internet Service Providers) provide DNS servers but I tend to believe using public DNS services such as Google (220.127.116.11), Cloudflare (18.104.22.168) for a faster response. Whenever users type-in a website, the router forwards the request via the ISP to the Public DNS servers or the server configured in the users’ system. The respective DNS Server responsible, will resolve and respond to the user query while leaving a record (DNS caching) within its server space. This is called a DNS hierarchical process.
If a response ends in an error, the requested domain is either the unavailable, not exposed to public internet misconfigured. View this informative video about how DNS resolves a website.
One more interesting fact: Every computer stores some amount of DNS queries in its cache just like every other DNS system/server in the world for faster response time. A computer system requests the DNS server only when the record is not stored within the system cache.
Hope this guide helps you. If you have any questions about it, just toss a comment below.