News
10 June 2019
Reading time: 3 minutes
How to clear DNS cache

DNS cache stores the IP addresses of visited sites on the local computer in order to load them faster the next time.
If you regularly get a 404 error, then clearing the DNS cache can help you. For example, you moved the site to another server and the site has changed the IP address. In order for the browser to open the site from a new IP address, it is necessary to remove the cached IP from the DNS cache.
How to clear DNS cache in the operating system
Ubuntu, Windows and macOS allow clearing DNS cache with a single terminal command.
Windows 10
- Open the Start menu and type cmd in the search field. You will find the Command Prompt (cmd.exe). Right click of the mouse will open the context menu. Choose the Run as administrator option.
- Type ipconfig/flushdns inside the terminal window and press Enter. Done!

Windows Command Prompt
Ubuntu
- Search for the Terminal in the applications list or press ctrl+alt+T
- Type the sudo systemd-resolve --flush-caches command and then type in the password. Done!

Ubuntu Terminal
macOS 10.14 Mojave
- Press the search icon in the top right corner and search for the Terminal.
- Inside the terminal window type the sudo killall -HUP mDNSResponder; sleep 2; command and specify the administrator password. Done!

macOS Terminal
How to clear the DNS cache in the browser
Modern browsers have their own DNS client, which also caches IP addresses. After clearing the cache in the system, we recommend further clearing the DNS cache in the browser.
Google Chrome, Opera, Vivaldi
This method is suitable for clearing the DNS cache in Chromium based browsers.
- Type chrome://net-internals/#dns inside the browser field. Press Clear host cache.
- Inside the same window choose the Sockets option and press Flush socket pools. Done!

Google Chrome
Mozilla Firefox
- In the application menu select Settings.
- Open the Privacy and security section, find Cookie and Site Data.
- Press the Clear Data button. The new window will appear. Untick the marker near Cookies and Site Data. Press Clear and close the window. .
- Done!

Firefox Clear cache window
If this method did not work, then clear the DNS cache through the browser's fine tuning window.
- Open the about:config page and press the I accept the risk.
- Inside the search field type network.dnsCacheExpiration. Change the found value to 0, press ОК, then change it back to 60.
- Then search for the network.dnsCacheEntries. Then change the value to 0 the same way you did previously, press OK and change it back to 60.
- Done!

Firefox fine tuning
Try VMmanager for web server creation and development
VMmanager is a platform for managing virtual computing capacity. VMmanager allows you to:
- create web servers with preinstalled software within seconds;
- develop and test applications;
- set up VPS/VDS hosting.
VMmanager supports KVM virtualization and ultra-fast LXD virtualization, automates routine operations, and helps optimize administration and development.
Subscribe to the articles from IT infrastructure management experts
Find out more about the platforms
Save your time and find out all the information you need with the consultation.
+Request demo and see ISPsystem products in action
Evaluate the features of ISPsystem products. Qet access to an online demo.
+Discover FirstVDS experience using DCImanager 6
FirstVDS is a Russian VPS hosting provider that works in two data-centers. Fill out the form and get detailed case of infrastructure growth with DCImanager
+Complete DCImanager 5 and DCImanager 6
Not sure if migration from the old version will be useful? Leave your email and we will send you a complete comparison of all features of DCImanager 5 and DCImanager 6
+