What Is a DNS Cache and How Does It Work?
What Is a DNS Cache and How Does It Work? GA S REGULAR Menu Lifewire Tech for Humans Newsletter! Search Close GO Internet, Networking, & Security > Home Networking 864 864 people found this article helpful
-------------------------------------
Record Name . . . . . : docs.google.com
Record Type . . . . . : 1
Time To Live . . . . : 21
Data Length . . . . . : 4
Section . . . . . . . : Answer
A (Host) Record . . . : 172.217.6.174
In DNS, the "A" record is the portion of the DNS entry that contains the IP address for the given host name. The DNS cache stores this address, the requested website name, and several other parameters from the host DNS entry.
DNS Caching and How It Makes Your Internet Better
Checking a local copy is faster than searching remotely every time
By Bradley Mitchell Bradley Mitchell Writer Massachusetts Institute of Technology University of Illinois An MIT graduate who brings years of technical experience to articles on SEO, computers, and wireless networking. lifewire's editorial guidelines Updated on March 18, 2021 Reviewed by Chris Selph Reviewed by Chris Selph Chris Selph is a CompTIA-certified technology and vocational IT teacher. He also serves as network & server administrator and performs computer maintenance and repair for numerous clients. lifewire's editorial guidelines Tweet Share Email Tweet Share EmailIn This Article
Expand Jump to a Section The Purpose of a DNS Cache How the DNS Cache Works Effects of DNS Cache Poisoning Clear the DNS Cache With DNS Flushing A DNS cache (sometimes called a DNS resolver cache) is a temporary database, maintained by a computer's operating system, that contains records of all the recent visits and attempted visits to websites and other internet domains. In other words, a DNS cache is just a memory of recent DNS lookups that your computer can quickly refer to when it's trying to figure out how to load a website. Maddy Price / Lifewire The information in this article applies to home users who haven't changed their DNS settings.The Purpose of a DNS Cache
The internet relies on the Domain Name System to maintain an index of all public websites and their corresponding IP addresses. You can think of it as a phone book. With a phone book, we don't have to memorize everyone's phone number, which is the only way phones can communicate: with a number. In the same way, DNS is used so we can avoid having to memorize every website's IP address, which is the only way network equipment can communicate with websites. This is what happens behind the curtain when you ask your web browser to load a website. You type in a URL like lifewire.com and your web browser asks your router for the IP address. The router has a DNS server address stored, so it asks the DNS server for the IP address of that hostname. The DNS server finds the IP address that belongs to lifewire.com and then is able to understand what website you're asking for, after which your browser can then load the appropriate page. This happens for every website you want to visit. Every time you visit a website by its hostname, the web browser initiates a request out to the internet, but this request cannot be completed until the site's name is "converted" into an IP address. The problem is that even though there are tons of public DNS servers your network can use to try to speed up the conversion/resolution process, it's still quicker to have a local copy of the "phone book," which is where DNS caches come into play. The DNS cache attempts to speed up the process even more by handling the name resolution of recently visited addresses before the request is sent out to the internet There are actually DNS caches at every hierarchy of the "lookup" process that ultimately gets your computer to load the website. The computer reaches your router, which contacts your ISP, which might hit another ISP before ending up at what's called the "root DNS servers." Each of those points in the process has a DNS cache for the same reason, which is to speed up the name resolution process.How a DNS Cache Works
Before a browser issues its requests to the outside network, the computer intercepts each one and looks up the domain name in the DNS cache database. The database contains a list of all recently accessed domain names and the addresses that DNS calculated for them the first time a request was made. The contents of a local DNS cache can be viewed on Windows using the command ipconfig /displaydns, with results similar to this: docs.google.com-------------------------------------
Record Name . . . . . : docs.google.com
Record Type . . . . . : 1
Time To Live . . . . : 21
Data Length . . . . . : 4
Section . . . . . . . : Answer
A (Host) Record . . . : 172.217.6.174
In DNS, the "A" record is the portion of the DNS entry that contains the IP address for the given host name. The DNS cache stores this address, the requested website name, and several other parameters from the host DNS entry.