What is domain name server (DNS)
DNS or domain name server is a phonebook in which all the domain names are saved with their associated IP addresses.
An IP address is a number like 172.217.204.102. All the network devices which are connected on the internet has some IP addresses associated with them. To connect any computer to the network, we need to know its IP address. As it is difficult to remember the IP address of the website so we need an English form of the website name. For example, Google.com is a website name. Here .com is called an extension of the domain name. It is easy to type Google.com in the browser address bar. When we type the website address in the browser then the request is sent to the ISP (Internet Server Provider). ISP saves the popular IP addresses of the websites. ISP saves the IP addresses in its cache. If the website address is known to the ISP then it gives IP address to the browser. That IP address is then connected to the hosting server. The hosting server loads our files and displays the web page in the browser.
Suppose we type any less popular website name in the browser so the request goes to ISP. That website address is not found in the ISP cache. The ISP cache tells the DNS Resolver to find the IP address of the website. The DNS Resolver sends a request to the Root Server. The Root Server then sends a request to the Top Level Domain server. If the website name ends with the .com extension then Root Server sends a request to the .com domain server. If the extension of the domain name ends with .net then Root Server sends a request to the .net domain server. The domain server then sends a request to the Authoritative Server. The Authoritative Server has all the IP addresses of the domain names. So the Authoritative Server gives the IP address to the domain server. The domain server sends the IP address to the Root Server. The Root server then sends the IP address to the DNS Resolver. The DNS Resolver finally gives the IP address to the browser. After the browser finds the IP address, it then connects to that IP address of the hosting company. The hosting company fetches the files from the hosting server and displays them on the browser.
The responsibility of the domain name server is to find the IP address of the domain name. Now you understand the DNS server, let’s discuss some of the pros and cons of a domain name server (DNS):-
Advantages of domain name server (DNS)
Some advantages of DNS are:-
Easy to remember:
It is easy to remember domain names instead of IP addresses. Some domain names are very simple to remember such as facebook.com and google.com.
An integral part of the internet:
Domain name servers are an integral part of the internet. Without a DNS server, the internet is nothing. All the internet consists of websites and loading the website needs a DNS server. The DNS server has the responsibility to find the IP address of the website.
Search engine friendly:
Users can find any website using a search engine. The search engine works fast as they don’t need to remember the IP address of the websites. They only need to remember the names of web pages. All the web pages of the website are related to the website name. Suppose you have a facebook.com website then facebook.com/pages is another web page of the same website. It is easy for a search engine to remember the relation between domain names and their web pages.
Change in IP address:
If any website changes its IP address then the working of the website is not interrupted. This is the art of a DNS server. It automatically updates its database with new IP addresses. Users do not need to remember the new IP address. They only need to type the website name and the DNS server will connect the website to a new IP address.
Very fast:
DNS servers are connected to high-speed internet. The response time of these servers is very fast. They find the IP address within a second. If the IP address is not found by any DNS server then the request goes to the nearest DNS server. There are hundreds of DNS servers working on the internet and they are all connected. Their sole responsibility is to find the IP address in quick time.
Easy and flexible:
It is easy to use a DNS server. They are flexible also. They are also easy to configure. You just need to remember the nameservers of the website. All other tasks are done in the background by the hosting companies.
Load balancing:
If any DNS server gets a lot of requests then new requests are directed to the nearest server. That mean load balancing is done by the servers.
High security:
We use websites in our daily life. So we need to trust the domain names we use daily. For example, if we open facebook.com then we have some trust in that website. We trust that the Facebook website will not hack our computer. That means its DNS server is secure.
Two addresses:
Every website has two DNS server addresses. If one address fails then the other address gets the responsibility of resolving the domain name to an IP address. One nameserver is primary and the other is secondary. If the primary nameserver fails then the request goes to the secondary nameserver. By using two domain nameserver the website will work nicely.
Disadvantages of domain name server (DNS)
Some disadvantages of DNS are:-
Can be hacked:
As we see in previous years that DNS servers were also hacked. After hacking the DNS, hackers usually display their data such as advertisements on the hacked website. The hackers can direct the website to their IP address. It is dangerous for website users because the data of website users can also be accessed by hackers.
Stops internet:
Suppose DNS servers get a virus attack then the websites associated with the DNS server also not loads. This is a very dangerous issue because if thousands of websites stop working then the business of the website owners is damaged.
Controlled by one organization:
All the DNS servers are controlled by ICANN. ICANN is a non-profit organization. The organization belongs to one country. If any rules and regulations of the country change then ICANN responsibility may also change.
Incorrect names:
There exist some hackers who own similar domain names to popular websites. They purchase similar domain names and fool the people and get benefits from them. If any user types by mistake any similar domain of a popular website then the user goes to the wrong website which looks the same as the original website. Then that website gets important information from you e.g. get login details from you.
Error handling:
It is difficult to troubleshoot the DNS server. If any error occurs in the DNS server then fixing it is a difficult process. This is because all the DNS servers are connected.
Master-slave relation:
The DNS servers work in a master-slave manner. One DNS server acts as a master to other DNS servers. Main DNS servers guide other DNS servers. If the master server fails then other DNS servers also become unresponsive. This is because they cannot forward their response to the master server.