When we try to reach a website using its name, the browser asks the recursive DNS server to resolve that name into an IP address.
The recursive DNS server - since it doesn't know the corresponding IP address of the website -, contacts the authoritative DNS server for that name - which knows how to get the IP address corresponding to the website -.
The authoritative DNS server answers the recursive DNS server either with the IP address of the website or with the IP address of the authoritative DNS for the website.
Below is a simplified diagram of this process - when querying about "google.com" -:
When the loading of the website takes lot of time, one of the recursive DNS servers mentioned in the "/etc/resolv.conf" file could have some issues.
To investigate that, we try to do an "nslookup" - for google.com - using one of the recursive DNS servers in the "/etc/resolv.conf" file:
- "10.23.6.8" is the IP address of one of the recursive DNS servers in the "/etc/resolv.conf".
We could also use the "dig" tool to the same effect:
The "warning" section gives us clues as to what went wrong.
We might want to check out the following parameters, the "recursion" and also the "allow-recursion" parameters in the "/etc/bind/named.conf" configuration file of our recursive DNS sever:
Recursion : when it is set to "yes", the DNS query is recursive, the server attempts to query the authoritative DNS servers to answer the query. The DNS server could still use its cache, but the cache is not updated with new entries.
allow-recursion : It gives the DNS server the list of hosts that can make recursive queries.
The above options are more specific to the "Bind" nameserver.