How to Flush DNS Cache on Windows, Linux, Mac and Chrome

What is DNS Flush?

Flush DNS is a command used to reset the DNS client [computer] cache that is being used to adjust information from changes that occur in a domain, nameserver, DNS with new data.


To resolve the domain name itself takes about 24 - 72 hours. But if on the network or on your computer you still see the data as before then a DNS flush needs to be done.


This process should be done regularly so that your computer and network performance remains optimal. To do this, you need to run some simple coding. But you don't need to worry because later we will explain everything in more detail.

Water Itu DNS Cache?
DNS Cache or sometimes it can also be called DNS Resolver Cache is a temporary database on a computer operating system that stores IP data records of domain names that have previously been visited by computer users.

Here are the components in the DNS cache:

  • Resource data – contains record descriptions, such as addresses and hostnames.
  • Jenis record – explain record types (A orAAAA record).
  • Nama record – displays the domain name of the DNS entry.
  • Time To Live (TTL) – resource record validity time in seconds.
  • Class – appropriate set of resource record protocols.
  • Panjang data resource – refers to the value of the resource data.

How to Flush Windows DNS

For the record, that for domain propagation itself globally remains 1×24 hours. The following method is used if after that period the domain is not connected to the Hosting or after renewing / suspend and expired errors.

How do you do it? It's very easy, that is:

  1. This method applies only to Windows. Please open CMD (Command Prompt) in your Windows
  2. Then enter or copy and paste the following code

    ipconfig /flushdns

    and press Enter, after which it will be as shown below:

If it's like above, please open and close your browser again, then check the error domain. If it's still an error, maybe you can wait or need a consultation with your Provider.

How to Flush Linux DNS

By default, Ubuntu does not cache DNS records. If you manually installed a DNS service, such as the name service caching daemon (nscd), the steps below will show you how to flush the DNS cache on your computer. Be sure to use administrator privileges when doing so.

  1. Press the Ctrl+Alt+T keys simultaneously to open the terminal window.
  2. Enter the following command to delete the DNS cache files in the subdirectory init.d:
    sudo /etc/init.d/nscd restart

Furthermore, to flush DNS on systems that use systemd.

  1. Press the Ctrl+Alt+T keys simultaneously to open the terminal window.
  2. Type the following command:
    systemd-resolve --flush-caches
  3. Enter the following command at the command prompt to find out if the previous command was successful:
    systemd-resolve --statistics

How to Flush DNS Mac OS X

While it's actually quite easy to flush DNS cache on Mac OS X, there is one thing to note, and that is that you need to run the correct DNS flush command according to your current OS X version.

  1. Press the F4 key, then enter the terminal in the Launchpad search field to open the command terminal window.
  2. If you are using Mac OS Sierra, X El Capitan, X Mavericks, X Mountain Lion, or X Lion, the next way to flush DNS is to enter the following command at the command prompt:
    sudo killall -HUP mDNSResponder
  3. To flush the DNS cache on Mac OS X Yosemite, enter the following command:
    sudo discoveryutil udnsflushcaches
  4. If you are using Mac OS X Snow Leopard, use the following command:
    sudo dscacheutil -flushcache
  5. For Mac OS X Leopard and below, enter the following command to flush DNS:
    sudo lookupd -flushcache
  6. To clear the DNS cache in Mac OS X High Sierra, enter the following lines at the command prompt:
    sudo killall -HUP mDNSResponder
  7. Then, here's the command to flush DNS on Mac OS X Mojave:
    sudo killall -HUP mDNSResponder
  8. If running Mac OS X Catalina, use this command:
    sudo killall -HUP mDNSResponder
  9. Finally, here's how to clear the DNS cache on Mac OS X Big Sur:
    sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder

How to Flush DNS in Google Chrome

Google Chrome keeps a DNS cache separate from the OS on your computer, doing a DNS flush will also help resolve connection issues. This is especially important if you use Google Chrome as your primary browser.

Remember, this cache is different from the browser cache. So, the method will also be different from how to clear the browser cache.

Here's how to flush Chrome's DNS:

  1. Open Google Chrome and enter the following address into the URL field:
    chrome://net-internals/#dns
  2. On the net internal settings page, select Clear host cache.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.