How Does DNS Work?

Technical Guides

· 10th December 2021·Hosting and DNS

Estimated read time 6 minutes

Excerpt

If you have studied sixth grade, you’ll remember that old computer teacher telling you a little something about ‘binary language’. Let’s jog our memories a bit.

How Does DNS Work?

Basically, the CPU can’t understand the normal English words and letters that the user puts in. All the commands are translated to 1’s and 0’s so that the computer can comprehend and execute them. You came to this article by looking it up on the net and clicking on the title, etc. All those actions were delivered to the computer in the form of binary language. There is, in essence, a lot of translation going on in the system.

DNS, in a nutshell, is the name of one such similar translation process. The Domain Name System converts the alphanumerical domain name, like www.iamdumdum.com, to its respective IP address. To a web browser, the site link is total gibberish. It navigates by using IP addresses that are assigned to the web pages, not their names and titles. IP addresses are usually really complex like ‘192.168. 1.1’. It won’t be very easy for you to enter a value like this every time you want to visit a site, now would it?Rather, it is harmful for SEO, and driving traffic to website would be pretty hard as well. Saving you from this trouble is all that DNS is about.

That was pretty much it for the introduction. Let’s take a look at this thingamajig in some detail and see how it works.

Defining DNS

Defining DNS: What is the Domain Name System?

I don’t know if you were around in the 1990s, but back then we had this thing called a telephone directory or phonebook. You could find them on public phone booths and use them to look up phone numbers for the person you wanted to call. People also had personal, pocket-sized ones. Any time they wanted to call a person, they would look up the name in the directory and then dial the number written alongside.

DNS is basically the phonebook or telephone directory of the internet. When you enter the domain name in the browser, it ‘looks’ it up in the Domain Name System and finds the IP address assigned to it. Then, using this IP address, the website is loaded. And it has nothing to do with your content management system

In this whole translation and interpretation process, there are several components and steps involved. Let’s take a gander at those:

The Components

The components here refer to servers that play a role in the execution of the request placed to the DNS by the user. The process of fetching the webpage according to the request or command put in by the user (in the form of the domain name) is called 'DNS Resolution'. Once the web page is loaded, the DNS request is said to be 'resolved'.

There are four main servers that are responsible for the DNS resolution. They are:

• Recursor

• Root Server

• Top-Level Domain Server

• Authoritative Server

Recursor

This is the first DNS server that is responsible for fetching a website as per the instructions given by the user. The recursor does not really do much of the actual translation and conversion. It merely receives the request from the user and forwards it to the next server. It’s like a police dispatcher. They don’t bust the bad guys but they perform the fundamental task of answering the emergency calls and relaying the information to the relevant officers.

Root Server

This is the point where the translation begins. Once the request is forwarded by the recursor, the next thing is to pinpoint the IP address so that the page can be loaded. The root server, as well as the TLD and authoritative server, are used for this pinpointing process.

For example, when you want to look up a word in the dictionary, you first open it up. Then you find the alphabet with which your selected word starts. After that, you go to the column that has the words closest to the one you want to know the meaning of. There are, essentially, three steps that ultimately lead you to your desired item.

The root server is like the first of these three steps i.e. the most general one.

The root server is capable of two things: 1) resolving queries that require results from the root level and 2) forwarding the request to the TLD server. If the user enters a command that can be resolved at the root level, this server will perform it on its own. But, typically, the domain names entered by users are not found at the root level. They are located deeper in the hierarchy and the other servers have to necessarily come into play.

Have a look at this diagram to get a better idea. The ‘Root’ written at the top refers to the root level. The extensions like ‘.org’ and ‘.com’ pertain to the TLD server, and so on.

Root Server

TLD (Top Level Domain) Server

The TLD server operates a layer deeper than the root server. If we use the same dictionary example that we did above, then this server would be the part where you find the exact alphabet i.e. the second step.

Typical domain names have a suffix at the end e.g. ‘.com’, ‘.org’ and ‘.net’ etcetera. These extensions refer to the TLD server. You might have noticed that if you want to go to ‘www.iamdumdum.com’ and you accidentally write ‘www.iamdumdum.org’, then you won’t get your desired webpage. Since the wrong TLD server was contacted during the request, the page failed to show up.

Authoritative Server

Sticking to the same example we used earlier, the authoritative server has the similitude of the exact column in the dictionary where the desired word is located i.e. the last step. When the domain name reaches the TLD server, it forwards it to the authoritative server so that it can dig deeper and come up with the exact result. If this server finds the IP address for the entered domain name in its records, the webpage will appear in front of the user. If not, an error will show instead, indicating that the entered address is either input correctly or the page doesn’t exist. DNS mismatch is one of the core reasons we see the website goes down.

Conclusion

And there you have it, people. Hopefully, after reading this article, you know a tad bit more about DNS and how it works.

To sum it up, the Domain Name System is used for converting the domain name into an IP address (that is comprehendible to the PC). There are a few servers involved in this process, which we discussed above.

The next time someone asks you how on earth the browser fetches the web pages and sites for the user, you’ll have quite a bit to tell them.

Technical Guides
Technical Guides

Get 10% off your order

UYD-772-MK5

Enter UYD-772-MK5 at the checkout to get 10% off one-time tasks or any maintenance plan.

Get started