We all, tech people, love to use abbreviations like HTTP, SMTP, URL and many other. The problem is that these technical terms sometimes don’t make it clear what they actually mean to the ‘not so tech-friendly’ people or sometimes we also forget what are those, their working and purpose.
“DNS” is one of those terms.
I got several comments and questions on my article written on “Server’s DNS Address Could Not Be Found” where I explained how to fix this problem. One of the key questions that most of the reader asked, what is DNS, its purpose and how it works.
Keep reading and you’ll find out all the answers to DNS.
Defining the DNS
In order to understand DNS, you need to have a basic understanding of domain names and IP addresses.
IP address is a number-based address that uniquely identifies devices such as a computer, laptop, printer, router etc. which uses the Internet to communicate with each other. Think of it as it’s like the street address to connect and communicate with one computer (or device connected to it) on the Internet. IP address can be the complicated number of almost 12 digits.
Now, Imagine memorizing these numerical address (for example, 126.96.36.199) to find websites on the Internet.
Here comes, Domain name.
Domain names are used to identify one or more IP addresses with a name. Domain names are actually created to make the IP addresses more human-friendly and provide you the ability to locate a website on Internet in a much easier way. Instead of “1600 Pennsylvania Avenue; NW Washington, D.C. 20500 U.S”, you can call it ‘White House’. So, instead of remembering 188.8.131.52, it’s much easier to type and remember DeepanshuGahlaut.com
So, what is DNS?
The Domain Name Server aka Domain Name System (DNS) is used to resolve domain names such as www.deepanshugahlaut.com (human-readable format) into IP addresses such as 184.108.40.206 (machine-readable format). It is a system that makes sure that you end up in the right place every time you type or request for a specific page.
Simply put, it is a database that stores all of the domain names and corresponding IP numbers and the system that does this translation job is called DNS resolver.
Purpose of DNS
The key functions of DNS are:
- Resolving IP addresses into Domain Names.
- Provides information about mail exchange with the domain.
- In Distributed Internet Services such as content delivery networks (CDNs) and cloud computing services.
- Providing efficient storage and distribution of IP addresses of blacklisted email hosts.
How DNS Works
To understand, how DNS work, consider a typical user John who is looking for a website, for example, DeepanshuGahlaut.com (which resolves to 220.127.116.11). He launches his browser to visit this site. Then,
- His browser sends a request to the DNS server about the IP address of DeepanshuGahlaut.com
- The DNS server checks its database to find IP of DeepanshuGahlaut.com. If the DNS server does not know the IP address, it asks for another DNS server for that IP address.
- The second DNS server passes the IP to first DNS server that is cached by this server for future use.
- The server returns the address to user X.
- The browser displays the website to user X.
Diagram: How DNS works
The process is same for every website you visit and this entire process, from start to finish, takes only milliseconds to complete.
In short, DNS can be considered as a mechanism that resolves IP addresses, query and updates the database, replicated the information among other servers.
So, what are your thoughts on DNS system? Have something to add to the article? I’d love to hear you all in comments.