Domain Name System – Definition
The Domain Name System is also frequently called shortly DNS, is a decentralized hierarchical infrastructure. Thanks to it, the Internet is as simple and easy for people as it is nowadays. At its core, it includes a database with all of the existent domain names and the IP addresses associated with them.
When a user wants to visit a particular website, types its domain name. That triggers a long DNS process for finding its IP address (IPv4 or IPv6). The domain name has to be translated because machines don’t communicate with words but only with numbers. After the corresponding IP address of the domain name the user wants to visit is found, the browser is able to connect to the website.
Back in the days when the Domain Name System was not designed yet, it was a little bit more complicated to reach a website. It was necessary for users to type the long and difficult IP address, like 188.8.131.52, rather than a simple domain name, such as domain.com. Imagine what a memory challenge it was! The Domain Name system gave the opportunity for people to interact with the domain names and allowed machines to connect with their comfortable language (IP addresses).
How does a DNS lookup work?
- A user wants to visit a website and type a domain name, for example, domain.com.
- In case the user recently visited that website, it is going to be stored in cache memory. Easily the query will get resolved. The user is going to be directed to the IP address of the web hosting of the domain name. In case it is not available in the cache, the query still has to find an answer.
- The next place is the DNS recursive server of the Internet Service Provider (ISP). There is a bigger chance of finding an answer to the query inside its cache. Every DNS query of the ISP’s clients is passing through it, and all of the answers are saved for the TTL estimated in the DNS records. So it is possible the answer to be found there. Then, the answer is going to be delivered to the user.
- If it is not found there, the query still has to go looking for an answer. The next place is the root name server. It will see which TLD is responsible for the domain name, and it is going to direct to the name servers for that specific TLD. In our illustration, the .com name servers.
- The query of the user proceeds to the TLD name server. It will provide information for the authoritative name server responsible for the domain the user is looking for.
- The authoritative name server holds the essential information for the domain name. In addition, the user is finally going to receive an answer with the A, AAAA, or both records. They show where the website is hosted.
- As a result, the user is capable of visiting and exploring the website (domain.com) that is requested. All of the DNS records are going to be stored on the recursive DNS servers and in the cache memory of the user’s device.
Purpose of DNS
DNS has several very essential purposes that make the experience on the Internet easy and accessible for users.
- Providing easy and fast searches on the Internet
- Domain name resolution
- Domain Name System (DNS) caching.
- Load balancing
- Verifying of services, servers, e-mails, and more
- E-mail servers (messages’ routing)
- Service’s routing
Suggested article: How to check DNS propagation?