What is Flush DNS? How to Clear DNS Cache on Windows, Linux, MacOS

What is Flush DNS? How to Clear DNS Cache on Windows, Linux, MacOS Picture 1

Surely you have "gone crazy" many times when your computer cannot access the web because of errors such as  404 page not found  or  502 bad gateway . Flush DNS or delete DNS will be a method to help you fix these errors quickly. So how to flush DNS on Windows, Linux or MAC operating systems? Let's  find out with TipsMake ! 

What is DNS Flush?

Flush DNS is to clear the DNS cache. Why do you have to do this when this memory helps you access the web faster? Because when websites change their IP address or switch to another web server and your DNS cache has not been updated, errors will definitely occur. Even if   there is nothing unusual  about the internet , you still cannot access the website with typical errors such as 404 page not found . Therefore, clearing the DNS cache will help your computer update the web information and successfully access that website. So how to flush DNS? Each operating system will have a different way of doing it, please see the next section!

What is DNS Cache?

DNS cache is a system that temporarily stores IP addresses corresponding to domain names that users have visited. When a user visits a website for the first time, the browser sends a request to the DNS server to resolve the domain name into an IP address.

This IP address is then stored in the DNS cache on the user's computer to speed up access for subsequent visits without having to perform the query process again.

The DNS cache stores information in the form of records, including the IP address and the Time to Live (TTL) of each record. The time to live determines how long the record will remain valid in the cache before it needs to be refreshed. When a website changes its IP address, flushing the DNS cache (also known as flushing DNS) is necessary to ensure that users can access the new address without errors.

How to flush DNS on Windows operating system

To clear DNS on a Windows computer, follow these simple steps:

Step 1: Before flushing DNS, close all applications on your computer. First, go to the Start menu, go to the search box and type "cmd" then press enter. Or you can press the Windows R key combo to open the Run dialog box and type "cmd". 

Step 2: Now Windows command prompt will appear. You type " ipconfig /flushdns " into it and press enter. Wait a moment, Windows command prompt will display the result " Successfully flushed the DNS Resolver Cache ". That means the DNS cache has been successfully flushed. Now you can try reloading the website to see if the error has been fixed.

If flushing DNS does not fix the error, try disabling the DNS cache completely to see if it helps. To do that, follow these steps:

Step 1: Open Windows command prompt as instructed above by pressing Windows R to open the Run dialog box , type " cmd " and press Enter.

Step 2: Enter the following command " sc servername stop dnscache " or " net stop dnscache " and press Enter. This will disable the DNS cache until the computer restarts. Now reload the website to see if the network error has been fixed.

How to flush DNS on MacOS

Each version of MAC operating system will have a different way to flush DNS, but in general, all follow the following steps:

Step 1: Open Finder, go to Applications, Utilities and select Terminal.

Step 2: Type the following command (depending on the operating system version):

- For Mac OS 10.10.4 and higher versions:

sudo killall -HUP mDNSResponder

- For MacOS 10.10.1, 10.10.2, 10.10.3:

sudo discoveryutil mdnsflushcache

- For Mac OS 10.7, 10.8, 10.9:

sudo killall -HUP mDNSResponder

- For Mac OS 10.5, 10.6:

sudo dscacheutil -flushcache

To execute the above command, you need the password of the Admin account on the machine. If the DNS cache clearing process is successful, the system will not give you any notification. Go to the website and reload to see if the error has been fixed!

How to flush DNS on Linux operating system

A popular application for flushing DNS on Linux is the Name Service Caching Daemon (NSCD for short). You can clear the Local DNS cache by restarting NSCD via the following command in the terminal:

sudo /etc/init.d/nscd restart

If you use Ubuntu Linux, you can use the following command:

sudo service network-manager restart

Press enter to execute the command and then the DNS cache will be cleared.

How to disable Firefox

To disable Firefox, you can follow these steps:

Step 1: Close the browser:

  1. Click the "X" button in the upper right corner of the Firefox window to close the browser.

Step 2: Uninstall Firefox (if you want to remove it completely):

  1. Open the Start menu on Windows.
  2. Select "Control Panel".
  3. Find and select "Programs and Features".
  4. Find Mozilla Firefox in the list, right-click and select "Uninstall" to uninstall.

Step 3: Turn off sync (if you don't want to use this feature):

  1. Open Firefox, click the menu and select "Preferences" or "Settings".
  2. In the "Sync" section, turn off the sync option.

Step 4: Disable extensions:

If you just want to temporarily stop using Firefox without uninstalling it, simply close the browser.

In the Extensions tab, you can disable or remove unnecessary extensions.

Above are some knowledge about how to clear DNS cache to help fix the error of not being able to access the web. Hopefully the article has helped you know how to flush DNS on different operating systems. Leave your email below to receive useful technology articles from TipsMake! 

Source: TipsMake share

5 ★ | 1 Vote

May be interested

  • How to clear system and Internet cache on MacHow to clear system and Internet cache on Mac
    clearing your system and browser cache on your mac can help you free up more storage space for other important files. but how do you clear cache on your mac, and should you do so?
  • How to clear cache in Google Drive and DocsHow to clear cache in Google Drive and Docs
    sometimes google drive and docs (including sheets and slides) may not work properly. to solve this problem, clearing the cache is usually the best solution.
  • How to Clear the Cache on a MacHow to Clear the Cache on a Mac
    this wikihow teaches you how to clear the cache of temporary system files that your mac stores as you use it, as well as how to clear the safari browser's cache of temporary internet files. keep in mind that clearing the system cache can...
  • Instructions on how to clear cache on KodiInstructions on how to clear cache on Kodi
    as you know, kodi is an open source software, has a user-friendly interface. this program helps users to easily play and watch videos, music, media files from storage drives or the internet. if you experience playback issues, add-on lag or other unusual problems on kodi, you can clear the cache to fix. so how to clear cache on kodi? read the article below for more details!
  • Instructions on how to clear the browser cacheInstructions on how to clear the browser cache
    instructions on how to clear the browser cache. cache, also known as caching, helps us to access frequently used websites faster by temporarily storing data on computer memory. if the website is too big, the cache on our computer may be full and make our computer less efficient.
  • How to manage memory to restrict Linux to use too much RAMHow to manage memory to restrict Linux to use too much RAM
    you install linux with the promise that it will consume less system resources than windows. but why then, is your system still slow?
  • How to clear the DNS cache buffer in Google ChromeHow to clear the DNS cache buffer in Google Chrome
    clearing the dns cache can help you troubleshoot host connectivity when accessing some websites. in this article, tipsmake.com will guide you to do that.
  • How to clear Smart TV cacheHow to clear Smart TV cache
    cache is quite useful, but over time it can build up and slow down your smart tv - that's why it's helpful to clear your smart tv cache from time to time.
  • How to clear cache and delete different Android application data?How to clear cache and delete different Android application data?
    cache is a temporary storage of certain data files on a device. the purpose of cache is to speed up, make the device more 'smooth' and to reduce the amount of data being processed. when clearing cache data of a certain application, it means deleting temporary files in the cache.
  • How to clear cache on iPhoneHow to clear cache on iPhone
    iphone's storage is finite, so there comes a point where you won't be able to store anything more. one of the ways to get that space back is to clear the cache.