The DNS cache stores the IP address of every website you visit. Storing this information where the browser can find it quickly allows faster connections. However, there are reasons to flush your DNS, including protecting your browsing history and helping resolve certain errors. You can flush your DNS in Windows, OS X and Linux using the command prompt.
Anyone with access to your computer can look at your DNS cache and see what websites you've visited. Launching the Windows command prompt and entering "ipconfig /displaydns" reveals every entry in your cache. Once you've cleared your cache, it's empty except for things that update automatically, such as anti-virus or email clients checking for messages.
Clear Bad Connections
There isn't a separate listing for bad IP responses, so all the bad connections get lumped in with the good ones. If for some reason you have the wrong IP address in your cache, flushing your DNS removes the bad entry and makes the browser pull the correct IP entry. Reasons that your DNS might have the wrong entry for a website can include a virus or other malware, an error with your ISP or the website you're visiting changed IP addresses since your last visit.
Remove Old DNS Data
There's more than one DNS provider out there. For instance, Google provides a DNS cache and resolution service; another DNS option is Open DNS. Even after you've changed your DNS, if your cache is full of frequently viewed websites from your old DNS, the browser is going to pull from the cache — not the new service. By getting the cache cleared, you start pulling from the new DNS.
Clearing the DNS in any system requires you open a command prompt window. In Windows, open the terminal by pressing the Windows key and the "R" key; type "cmd" and hit the "Enter" key. To clear your DNS, enter "ipconfig /flushdns"; when it's done, you'll see a message displaying your successful flush. In OS X, open your terminal window and enter "dscacheutil -flushcache." For Linux users, the command is "/etc/rc.d/init.d/nscd restart".