Clearing the DNS Cache on Your Computer
You may need to flush your DNS cache occasionally — especially when developing or setting up your website. This guide explains how to clear your DNS cache on Windows, macOS, and Linux operating systems, as well as in the Google Chrome browser.
Many operating systems use caching to store DNS lookup results, which helps speed up network performance. However, when working on website development or domain configuration, cached DNS data can sometimes cause you to load outdated or incorrect site information.
To clear the DNS cache, follow the steps below for your system or browser.
Windows Operating Systems
-
Open a Windows PowerShell or Terminal window.
-
Right-click the Start button and select Terminal.
-
-
At the command prompt, type the following command and press Enter:
ipconfig /flushdns -
You should see the message: Successfully flushed the DNS Resolver Cache.
Your DNS cache is now cleared.
macOS Operating Systems
-
Open a Terminal window.
-
Click the Launchpad icon, type terminal in the search box, and press Return.
-
-
At the command prompt, type the following command:
sudo dscacheutil -flushcache -
Enter your password and press Return.
The DNS cache will be cleared.
Linux Operating Systems
Many Linux distributions do not use DNS caching at the operating system level. Instead, applications like web browsers maintain their own internal caches.
-
To clear an application’s DNS cache, simply restart the application.
If your Linux system uses a DNS caching service, refer to its documentation for instructions on clearing the cache.
Google Chrome Browser
Google Chrome maintains its own DNS cache. To clear it:
-
Open Google Chrome.
-
In the address bar, type:
chrome://net-internals/#dnsA list of hosts in Chrome’s internal DNS cache will appear.
-
Click Clear host cache.
-
Then, in the address bar, type:
chrome://net-internals/#sockets -
Click Close idle sockets, and then Flush socket pools.
Your DNS cache is now cleared across your system or browser.