DNS or Domain Name Service is the backbone of modern Internet infrastructure on which the World-Wide-Web works.
In simple words, it works by translating domain names that you type in your browser’s search bar with its IP address so that your browser can reach the webserver and fetch its contents.
DNS resolution can work another way as well, i.e., from IP to domain name. For this, your browser/OS will send name resolution queries to DNS servers as per your system’s/browser’s/ISP’s configuration. There are multiple places where we can define which name servers or DNS resolvers to use, and one may take priority over the other. Like your VPN service may override the DNS server configured by your ISP on your router.
Your operating system and browser may cache DNS query results for faster response time as there is some latency involved in querying from DNS servers. This cache is useful in improving response time though you may need to clear this cache as it may become outdated. An old cache may also be an issue due to privacy and security reasons, as this may be used for tracking user activity. Clearing browser cache may not clear up DNS cache at all places, so knowing the specific process will help.
In this article, we’ll be covering simple steps that you can use to clear the DNS cache on your system and different browsers.
On Windows, you’ll need to open Command Prompt either from the Start menu and searching for it or by pressing
Ctrl + r and typing
cmd and click
OK. Once inside the prompt, you can issue the below command to clear the DNS cache:
You’ll get output showing
Successfully flushed the DNS Resolver Cache. as shown below:
C:\>ipconfig /flushdns Windows IP Configuration Successfully flushed the DNS Resolver Cache. C:\>
This command works on Windows XP, 7, 8, and 10 and is fairly simple to use.
DNS cache, as discussed, is not only cached by an operating system like Windows; the browser you’re using may also be caching DNS records. We have the option to clear the same.
For Chrome, open a new tab and enter
chrome://net-internals/#dns in the address bar and press
You should get a page like the following:
Clear host cache button to clear the browser’s DNS cache. No prompts or confirmation messages will be shown, but this simple action should flush Chrome’s DNS cache for you.
Clearing the DNS cache in Firefox can be done by simply restarting the browser as the cache is not maintained on the disk. However, there is a way that you can follow to clear just the DNS cache in memory without needing to restart your browser.
For this, open a new tab in Firefox and enter this in the address bar, and press enter:
This page should show you DNS cache details and offers a button
Clear DNS Cache, click on it to clear the browser’s DNS cache.
Safari has a hidden option to clear different caches, including DNS, from its menu bar. But first, you would need to enable
- To do that, go to
Safarimenu and then open
- Then click on the
Advancedtab and then check
Show Develop menu in menu bar.
- Now you should see a new option,
Developin Safari’s menu bar.
- In that menu, select
Empty Cachesoption to clear the browser’s cache, including any caches related to DNS.
Ideally, you should restart the browser after clearing the cache for the best results.
We’ve covered some simple steps that allow you to clear DNS caches on your system, including OS and different browsers. The process is usually straightforward and can be quickly done by anyone. For certain cases, this may increase users’ privacy and security, and browsing history, especially in public infrastructure.
On the other hand, this can be helpful in troubleshooting issues related to connectivity and DNS resolution, especially for people using VPNs where caches may become old or outdated.