How Do I Flush My Device's DNS?

What Exactly Is DNS Caching?

DNS Cache is your device or browser's most recent memory of a site that you have visited. The device or application then uses this memory of your site (which includes IP addresses, host names, and other DNS records) to help load your site quickly. While this is awesome from a performance standpoint, sometimes if you have switched to a new server, or made updates that aren't reflecting when you visit your site, you will need to flush your device's DNS if clearing browser cache did not fix the issue.


How Do I Flush DNS From My Operating System?


*On Linux, there is no OS-level DNS caching unless a caching service such as DNSMasq, Nscd, or Systesmd-REsolved are installed/running. The following example is what would be ran on most modern Linux distros such as Ubuntu 20.04

  1. Close any open browser windows
  2. To check if the service is running you can run:
    sudo systemctl is-active systemd-resolved.service
  3. If the above command prints out active, then the following command can be used to clear the Systemd Resolved Cache
    sudo systemd-resolve --flush-caches


  1. Close any open browser windows
  2. Type cmd in the Windows Search Bar (Windows 8/10)or start menu search text box (Windows 7)
  3. Right-click on Command Prompt, and click Run as administrator.Screen_Shot_2021-11-19_at_9.21.35_AM.png
  4. Once on the command line, type the following:
    ipconfig /flushdns
    Successfully flushing the DNS Resolver Cache should provide the following message:




  1. Close any open browser windows
  2. Open the Finder
  3. Go to Applications >> Utilities >> Terminal
  4. On the command line, type the following:
    sudo killall -HUP mDNSResponder
    With sudo, you will be prompted for your password. Type in your password, and press Enter. With a successful flush, the command line wil not return any messages

Older macOS Versions commands are as follows: 

macOS version 10.6 and 10.5

sudo dscacheutil -flushcache

macOS version 10.10

sudo discoveryutil mdnsflushcache
sudo discoveryutil udnsflushcaches

macOS version 10.11 and 10.9

sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder

How Do I Flush DNS From A Modem Or Router?


While typically the above will address the issue, it may be necessary to power cycle your network:

  1. Turn off your computer.
  2. Turn off your modem and router (if you have one), then wait for about 30 seconds.
  3. Plug in your modem, then wait for 1-2 minute for all lights to indicate that it's fully connected.
  4. Plug in your router (if you have one), then wait for 1-2 minutes for these lights to indicate that services are fully connected
  5. Turn on your computer.
Was this article helpful?
0 out of 0 found this helpful