A Complete Guide for you How Works DNS

 A Complete Guide for you How Works DNS




Today I will discuss with you a very common topic. Do you know what is DNS and how it is work? If you don't know, this article is for you.

If you've been talking about the internet for a long time, you must have heard the name DNS. Its full name is Domain Name System. This DNS is one of the most basic and essential elements of the Internet. With the help of this DNS, your browser can basically know which website or server you need to go to.

But what is the main function of this DNS thing and why is it needed? This is what I will discuss today.

When you visit a website, you must type the URL of the website in the browser or simply the address of the website. E.g.  google.com or facebook.com . However, when you type the address of the website in the browser and press enter, but your browser or your internet does not find the desired website with the help of that URL. Your browser basically needs to know the IP address of the website you want to visit.

So when you enter the address of a website, your browser basically sends a request to the DNS to get the IP address of your desired website. You can call this DNS like a dictionary on the Internet where the IP addresses of web servers are stored.
The first place this DNS request goes is the Recursive Name Server. This name server usually operates your ISP. However, there is no need to use your ISP server only. You can also use public name servers that are operated by different organizations. Such as Google Public DNS or Cloudflare DNS etc.

Recursive Name Server


Now let us know what these name servers do. These public name servers or your ISP name servers will most of the time store the IP address of your desired website. But many times if the IP address of the website is not stored, then basically this request goes to another place which is called root server. These 13 root servers keep records of the IP addresses of all top level domains (.com, .net, .org etc).

It may seem like a small number of servers, but the database of these root servers is much larger than you might think. These root servers basically use physical hardware and data centers around the world to ensure that these requests are always instantly served to everyone.

Then when the IP address behind your desired domain is found, then your request is handed over to the server of the top level domain you want to access (the server that was extracted with the IP address). Suppose you requested to visit the facebook.com domain.

This recursive name server will then send your request to the domain server at this URL. And from here your request will be sent to the cloud server where the domain of your desired website is pointing to the nameserver i.e. all the data of the website is hosted on the cloud server so that all the data of that website is served to you from there. And then basically you can access the website.

DNS caching


To save time, both your computer and the recursive name server cache these DNS requests, or simply put them locally on your device, so that your device can know in advance what the IP addresses of the websites you visit and when you next visit that website. When you go to visit, you don't have to look for a new IP address again.

This is exactly the reason why when you visit a website once and then visit it a second time, the website loads faster than before. This is because, like before, your browser does not have to find the IP address of the website. Because your computer has already saved these IP addresses.

DNS works without any problems in most cases. However, many times if a website you visit changes their IP address or their server, then there may be a problem. It then appears that the current IPT of your desired website does not match the DNS record saved in your cache.

Your browser may then show you 404 errors while accessing the website until it can update the DNS records anew. However, it can be fixed with the help of a simple CMD command. In Windows, open the command prompt in administrator mode> Enter the IP config / flush dns command and your DNS cache will be cleared.

DNS Spoofing / DNS Cash Poisoning


This is basically a hacking method that hackers use to exploit your device for their own benefit. Suppose you somehow inserted some kind of malware into your PC which targeted your DNS cache. These malwares will basically edit your DNS cache, change the IP addresses of all the websites you visit and set the IP of any malicious website they want so that when you visit that website you are redirected to a hacker's desired website without being taken to that website.

If you ever suddenly visit a website you visit every day and find that you are being redirected to another suspicious website, you are most likely a victim of DNS spoofing. You should then scan your entire system using a reliable malware scanner as soon as possible. E.g. Malware bytes.

So this was a simple explanation of what DNS is and what it does. The DNS thing has basically made our internet a lot easier. Otherwise we might have had to access every website by typing the IP address. It's a lot like calling someone by remembering and typing the complete phone number.


Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.