In this article would be explained how to clear the Domain Name System (DNS) cache on your computer.
A lot of operating systems use catching to store DNS lookup results and usually this is not a problem because it helps to accelerate network performance. Since the cache’s validity period is determined by Time To Live (TTL) and as long as the DNS cache files are still valid on the internet, they will answer content requests without having to go through the DNS server.
However, it might be the problem when is developing website or configuring domain settings. Due to DNS cache, the changes might not be seen for some time.
So, if you are facing some problems with DNS cache, this article is just for you. Here will be provided steps for clearing DNS cache for your preferred computer's operating system or web browser.
Windows operating systems
- Firstly, you need to open a DOS command window. To open this, you need to write in search cmd and then press Enter;
- At the command prompt, you need to type this command:
Then press Enter and your DNS cache will be cleared.
MAC OS X operating system
- To clear DNS cache, you will need open terminal window, which can be opened via Applications → Utilities → Terminal or press the F4 key, then enter terminal in the Launchpad’s search field to open the terminal windows;
- Now, you will need type the appropriate command for your Mac OS X version. In official Apple support website, you can find which command you should use:
- When you will type the command, you need to press enter and the DNS cache will be cleared.
Linux operating system
There are Linux distributions which do not use DNS caching at the operating system level. However, some applications, for example, web browser, maintain their own internal caches. So, to clear application’s DNS cache, you will need to restart an application.
Nonetheless, if your Linux computer uses the DNS caching service, you will need to check on the internet for a documentation.
Google Chrome browser
- Open Google Chrome browser and in the address bar, type: chrome://net-internals/#dns
- Google Chrome displays a list of hosts in its internal DNS cache;
- Then you need to click Clear host cache;
- In the address bar, you need to type: chrome://net-internals/#sockets
- Then click Close idle sockets click Flush socket pools. Now, DNS cache is cleared.