What is the purpose of the DNS lookup?
I have always wondered why the DNS lookup is implemented as it is.
For some reason there is a need for a server at the internet root to be able to find a human-friendly name when you are trying to open a website. So why not just return the IP address, which in many cases is more convenient. Why do we have to type in the name of the server when we click on a link and wait for a result? It seems like it might be less complex if just all we did was point our browsers directly to the server and not make a DNS request?
The answers I got are: A web server is needed to return a hostname. The HTTP protocol is supposed to use a hostname as a subpart of the URI.
Many sites use hostnames that do not have easy-to-remember IP addresses. For example, www.wikipedia.org and www.us are completely different web servers with different content, but have the same hostname.
A human-friendly hostname gives the user more information than the IP address. For example, some users might be familiar with domain names instead of IP addresses.
A DNS query can be time consuming. If it returns a name and takes a few seconds, the user may feel the delay as an inconvenience. If it takes a long time, the user may assume that the site is down.
DNS queries can fail (especially in countries where censorship and firewalls might prevent users from getting to the root servers). In such a case, the user would not be able to browse the internet because they would not know the IP address of the root server.
The server at the root is needed to be able to resolve any name within the internet. For example, if I wanted to open the server at the root has to be able to look up www.com and find the appropriate server.
Some web browsers actually have a setting to disable the DNS resolution. Some people just prefer the traditional method. The first one is the most likely one. I do agree with you, that most domains are fairly simple and can be represented in an easier to remember way (www.microsoft.com or www.google.com).
Related Answers
How to do a reverse lookup with nslookup?
To check the status of the reverse lookup name, you need to perform DNS reverse...
What is an example of a reverse lookup zone?
If you have multiple DNS record...
What is reverse lookup IP address to hostname?
A reverse lookup is a process that is used to get details of a company from its r...