Before knowing how DNS works, we must first understand what DNS is. Maybe the word DNS sounds foreign to some people. Still, a few people already know about this system, especially those working in the programming field.
We can say DNS as a phonebook of the internet where humans can access the website by simply writing the domain name instead of using numbers like cell phone contacts.
What is DNS?
Without realizing it, we often interact with this system in our daily life. So what exactly is DNS? DNS stands for Domain Name System. DNS is a system that translates domain names (URLs) into IP addresses in the form of numbers for computers when we access a website.
Humans are used to remembering things in the form of names made of the alphabet. Still, it is different from computers that do not recognize names. Knowing a command or identifying each other on a computer can only be done by using numbers such as IP addresses.
Therefore DNS was created to make it easier for humans to interact with computers.
Nowadays, you don’t have to write down or even remember the IP address to visit a page. You only need to remember the domain name and write it in the address bar. Then DNS will work by translating the domain name into an IP address for the computer.
For example, if you want to access the website www.sample.com, to read it by computer, this domain name must be numbered (IP address) such as 193.567.5.7. The domain name will automatically turn into a number that a computer can read through DNS.
How does DNS work?
As a system, of course, there is a structure or stages to run well in the process, likewise with DNS, which has locations to work to bring up websites that match the search.
The following are the stages of how DNS works:
1. DNS Query
The first stage begins with requesting information or what is called DNS Query. The requested information is the IP address of a website. This stage is where you write the domain name in the address bar.
After that, the DNS server will look for information in the file host, a plain text file in the operating system. The server will look in the cache if the information is not found. The server will look in the cache, a hardware or software component that temporarily stores data.
2. DNS Recursor
Next, we enter the DNS recursor stage, namely the stage of finding information from the client (browser). Suppose the information sought is not found in the cache. In that case, the system will immediately move to find information in the cache of the internet provider or internet service provider (ISP) to fulfill the request. The DNS recursor will ask the Root Name Server for help in the process.
3. Root Name Server
Root name servers can be considered indexes in a library that points to different bookshelves. So, the Root Name Server function refers to another specific location.
If the information cannot be found at the ISP, the system will look for the information you are looking for to the Root Name Server. However, the Root Name Server does not have the final answer to the information sought. Instead, it directs it to another more specific location.
4. TLD Name Server
The top-level domain can be considered as a particular bookshelf in a library. The system will read the type of information sought from the top-level domain from the root name server. TLD is the end of the domain name.
For example, www.google.com, the TLD of that domain name is .com. Each TLD has a specific server that will provide information to the system to forward the search to the server with the data you are looking for.
5. Authoritative Name Server
The authoritative name server is the last stop in the nameserver query. Suppose the authoritative name server has access to the requested record. It will return the IP address for the requested hostname back to the DNS Recursor (the librarian) that made the initial request. After this stage, the web browser finally displays the requested website page.
That’s all basic things you need to know first about DNS and how DNS works.
If you are interested in a current topic about technology, new knowledge, fintech, etc., check teknologi.id for great news every day.