Did you know your computer has DNS cache which stores stores the locations (IP addresses) of web servers hosting websites you’ve previously visited?
If the IP address of the web server changes before the entry in your computer’s DNS cache updates, you may find you’re no longer able to access the site, or you may be viewing the site from an old server.
To fix this, you just need to flush your DNS cache.
How To Clear Your DNS Cache Using Windows
Windows 10
Flushing the DNS cache on Windows 10 is very easy, however you will need to be an Administrator on the computer which you’re using to flush the cache. To properly flush the DNS Cache in Windows 10, you must ensure that you run the command prompt as an administrator user.
- Ensure that you’re on the Windows 10 desktop and logged in.
- Right click on the start menu and choose Command Prompt (Admin) or Windows Powershell (Admin) from the menu.
- Type in the command below and press enter or return on your keyboard.
ipconfig /flushdns
Running an older version of Windows, click to expand:
Windows 8
To clear your DNS cache on Windows 8, perform the following steps:
- On your keyboard, press Win+X to open the WinX Menu.
- Right-click Command Prompt and select Run as Administrator.
- Run the following command:
ipconfig /flushdns
Windows 7
In Windows 7, you can clear your cache using the following instructions:
- Click Start.
- Enter
cmd
in the Start menu search text box. - Right-click Command Prompt and select Run as Administrator.
- Run the following command:
ipconfig /flushdns
How To Clear Your DNS Cache In MacOS
Apple has made numerous revisions to it’s OS X, now macOS, Operating System. Over time, the method with which you can clear your DNS cache has changed depending on the version of macOS. To clear the DNS cache on your Mac, use list below to locate the version of macOS you are running and follow the instructions.
Mac OS X® 13 (High Sierra) To Current Version (2020, Big Sur)
To clear your DNS cache in Mac OS X version 11 (El Capitan) and 12 (Sierra), perform the following steps:
- Click Applications.
- Click Utilities.
- Click Terminal.
- Run the following command:
sudo killall -HUP MDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache
Running An Older Version Of MacOS?
Not to worry! Find your version below and expand the section to see how to clear the DNS cache on your computer.
Mac OS X® 10.4 (Tiger)
To clear your DNS cache in Mac OS X version 10.4 Tiger, perform the following steps:
- Open your Applications Folder.
- Open the Utilities Folder.
- Open the application called “Terminal”.
- Run the following command:
lookupd -flushcache
Mac OS X® 10.5 (Leopard) Thru 10.6 (Snow Leopard)
To clear your DNS cache in Mac OS X version 10.5 (Leopard) thru 10.6 (Snow Leopard), perform the following steps:
- Click Applications.
- Click Utilities.
- Click Terminal.
- Run the following command:
dscacheutil -flushcache
Mac OS X® 10.7 (Lion) Thru 10.8 (Mountain Lion)
To clear your DNS cache in Mac OS X version 10.7 (Lion) thru 10.8 (Mountain Lion), perform the following steps:
- Click Applications.
- Click Utilities.
- Click Terminal.
- Run the following command:
sudo killall -HUP mDNSResponder
Mac OS X® 10.9 (Mavericks)
To clear your DNS cache in Mac OS X version 10.9 (Mavericks), perform the following steps:
- Click Applications.
- Click Utilities.
- Click Terminal.
- Run the following command:
dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Mac OS X® 10.10.1, 10.10.2, And 10.10.3 (Yosemite)
To clear your DNS cache in Mac OS X version 10.10.1, 10.10.2, or 10.10.3 (Yosemite), perform the following steps:
- Click Applications.
- Click Utilities.
- Click Terminal.
- Run the following command:
sudo discoveryutil udnsflushcaches
Mac OS X® 10.10.4 (Yosemite’s Final Build Version)
To clear your DNS cache in Mac OS X version 10.10.4 (Yosemite), perform the following steps:
- Click Applications.
- Click Utilities.
- Click Terminal.
- Run the following command:
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
Mac OS X® 11 (El Capitan) And 12 (Sierra)
To clear your DNS cache in Mac OS X version 11 (El Capitan) and 12 (Sierra), perform the following steps:
- Click Applications.
- Click Utilities.
- Click Terminal.
- Run the following command:
sudo killall -HUP mDNSResponder
How To Clear Your DNS Cache Using Linux
- Open the terminal. Open the terminal as root, or enter
sudo
before entering the DNS flush command. - Restart the service
network-manager
. In the terminal, enterservice network-manager restart
and press Enter.
This will flush your DNS Cache.
That’s it! Now you know how to flush your DNS cache.