Well, I can’t really say why that fixed your problem, since a reboot is also another way of flushing your DNS. In fact, it’s one of the many reasons tech support folks insist you reboot as the first step when investigating just about anything.
But you seem to indicate that a reboot actually didn’t help.
However, flushing the DNS cache can sometimes help, and it’s much faster than a reboot.
Become a Patron of Ask Leo! and go ad-free!
First, a quick review of what DNS is.
DNS is an acronym for the Domain Name System.
As you probably already know, every device on a network is identified by an IP (Internet Protocol) address. However, you and I rarely know or care what the IP addresses are; we use names instead, like “askleo.com”. DNS is what maps from names to IP addresses.
When your computer accesses a domain name for the first time, it performs what’s called a DNS request, which boils down to asking “Hey, what’s the IP address for ‘askleo.com’?” Your computer is querying a DNS server whose job it is to answer exactly those kinds of questions. “Found it: ‘askleo.com’ is ‘126.96.36.199’”.
Once your computer gets an answer, it’s allowed to remember it for a period of time. Typically, it’s a day or two, but it actually varies based on the specific domain. For as long as your computer remembers that “askleo.com” is “188.8.131.52”, it doesn’t have to ask anyone. Once the time expires, it’s required to ask again, just in case it’s changed.
The memory of all the DNS lookups your computer has performed is called the ‘DNS cache’.
Sometimes, for various reasons, the cache becomes corrupt or out of date, or, to use a technical term, “messed up”. The symptoms vary, but the most common is that you can’t get to some web sites in your browser.
That’s when flushing the DNS cache sometimes helps. It forces your computer to empty the cache and forget everything it knows about DNS entries that it’s looked up previously. It has to start asking the DNS server for new and up-to-date information as you reference domains by name thereafter.
In a Windows Command Prompt, that looks like this:
C:\> ipconfig /flushdns
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.
Now, as I said, rebooting your machine has the same effect. Your DNS cache is not preserved across a reboot.
Other DNS Caches
Your computer’s DNS cache is not the only cache involved.
If you look at your ip configuration in the Command Prompt, making sure to specify “ipconfig /all” to see all the configuration information, you’ll find a line like this:
DNS Servers . . . . . . . . . . . : 192.168.1.1
The IP address for the DNS server may well be the IP address of your router.
Many routers perform the DNS function for local networks. If they need to, they make the DNS request from your ISP’s DNS servers on your behalf.
This allows two things:
- Your router can look up machines on your local network that it already knows. It knows about them since it was the device that assigned them their IP addresses in the first place. And since machines on your local network are not known on the internet anyway, they would not show up in the internet’s DNS servers.
- Your router can cache DNS lookups. That means if you have more than one machine going to the same site, the first one might cause the router to have to look it up, but the second machine’s request for the same domain would already be in the router’s cache; the router wouldn’t need to do anything more than simply return the answer.
And yes, this is another reason why rebooting your router is a frequent diagnostic step: your router’s DNS cache can also become “messed up”. In fact, it happens more frequently than most people expect. And just like your PC, rebooting your router forces it to start over with an empty DNS cache.
But wait! There’s more!
DNS caching doesn’t end at your router.
In fact, there’s an entire hierarchy of DNS servers that work to spread the load of answering all these requests for domain-to-IP mapping made every time someone tries to go somewhere on the internet, and each of those servers has its own DNS cache. Your computer may ask your router’s DNS, your router may ask your ISP’s DNS, and your ISP may ask their provider’s DNS, all the way up to what are called the “root DNS servers”.
Each of these servers will cache the answers for the DNS lookups, so as to avoid having to repeatedly ask the next DNS server in the chain for the same information over and over again. (Note that in reality this is an oversimplification. The root DNS servers will actually redirect lookup requests to other DNS servers based on the top level domain – “.com”, “.org”, and so on – and each of them may also then redirect to the “authoritative” DNS server for the particular domain being requested.)
All that just to turn “askleo.com” into “184.108.40.206”. 🙂
DNS is critical
As you can see, DNS is a critical component of how things are located on the internet. As a result, there are threats. Imagine what would happen if someone was able to change the DNS information in a cache, or on a server, maliciously. You might ask for “askleo.com” and get some other random IP address that would direct your browser to a malicious web site.
My site isn’t that high profile, but consider if someone were to do that for the entry for, say, “paypal.com”.
This concept of “DNS poisoning” is not new, and so far, the system has been fairly resilient, with only occasional issues. More commonly it’s malware on an infected computer that interferes with DNS, with the same misdirection as a result.
So, keep your machine safe and secure, and if you suspect a DNS-related issue, try the ipconfig trick.
Or you can just reboot your computer and your router, which is perhaps easier to remember.