Flushing the DNS cache can be necessary to clear outdated or incorrect DNS records on your computer. You may want to do this when you want updated DNS records of a website. You can either clear the DNS records saved by your operating system or you can clear it specifically for your Browser
Flush the DNS cache in Google Chrome
In Google Chrome enter the following command in the address bar and hit Enter.
chrome://net-internals/#dns
Then click on the Clear Host Cache
button to Flush or reset the DNS records saved locally in Google Chrome Browser.
You can also use the above command to check whether the IP address of a website has been updated after Flushing Chrome DNS.
You can also try Flushing it for your entire operating system.
Flush the DNS Cache of Your Operating System
The process varies depending on your operating system. Here are instructions for popular operating systems:
Flush DNS in Windows
Open Command Prompt as Administrator
- Press Win + X and choose “Command Prompt (Admin)” or “Windows PowerShell (Admin).“
- Alternatively, you can search for “Command Prompt” or “PowerShell” in the Start menu, right-click on the result, and select “Run as administrator.“
To Flush the DNS Type the following command and press Enter:
ipconfig /flushdns
You should see a message that says “Successfully flushed the DNS Resolver Cache.“
macOS (macOS 10.15 and later)
Open the Terminal app
You can find Terminal in the Applications > Utilities folder, or you can use Spotlight by pressing Cmd
+ Space
and typing “Terminal“
To Flush DNS
- Type the following command and press Enter:
sudo killall -HUP mDNSResponder
- Enter Administrator Password as You may be prompted to enter your administrator password.
Flush DNS in Linux
Open Terminal:
You can usually find the Terminal in your applications menu or by pressing Ctrl + Alt + T.
Flush DNS:
Depending on your Linux distribution, you might use different commands. Here are a couple of examples:
For systems using systemd (e.g., Ubuntu 16.04 and later)
sudo systemd-resolve --flush-caches
For systems using nscd (e.g., Ubuntu 14.04 and earlier):
sudo service nscd restart
There might not be a confirmation message, but you can check if the cache has been cleared by running a DNS query or using a tool like dig
or nslookup
After flushing the DNS cache, your computer will re-query DNS servers for domain information, and the cache will be rebuilt with updated data.