What is DNS caching?
When your computer is connected to the Internet it uses a DNS server, the same as all Internet hosts. Using the domain name of a website, you need to look up the site’s IP address, each time you go to a website. Your request for this lookup is eventually passed to a DNS Server somewhere.
At any one time, your request is one of thousands, or even millions, however, of requests being made across the Internet. If your local DNS Server is not Authoritative for the domain that contains the domain name you are trying to reach, then the DNS lookup process requires that it should ask other Servers to get an answer.
By performing these lookup requests, your local server could get quite busy, which could slow down its performance if it is Authoritative for a domain name.
To combat this the answers that a DNS Server gets from another DNS Server, these can be added to their own internal Database and retained for a period of time equal to the time to live (ttl) value set on the record stored on the Authoritative DNS Server.
Caching is the storing of these responses, and allows a quicker response from a DNS server to multiple queries for the same domain or host.
If you want to retrieve the next page on a site whist on a website, the local DNS server does not have to look up the host again, provided the time to live (ttl) value has not expired, causing the local DNS server to delete the information.
This is why it can take so long to contact a website at first, but subsequent requests for pages on the same site are somewhat faster.
Caching DNS Servers are configured for recursive lookup as well. This creates a server that will respond to lookup requests, by delivering answers from its cache, or looking them up on other servers.
Handling general lookups of Internet domains is the job of a caching DNS server. The load placed on an Authoritative DNS server is reduced with a caching DNS server, by handling the requests that do not pertain to the local domain.
Almost all Internet Service Providers (ISPs) operate some kind of Caching DNS Server.
Unfortunately DNS Caching is a double-edged sword. By storing recent answers and short-circuiting the normal resolution process it speeds up resolution. There is however, a down side.
Because DNS Servers cache answers, and don't delete these answers until the time to live (ttl) expires, it can take hours or days for the entire Internet to recognise changes to DNS information for your domain name.
If you have any questions about DNS then visit our DNS FAQ section for more help.