Your device’s DNS cache lets you visit your favorite websites without having to go through DNS resolution every time — but if your DNS records are outdated, you could run into connectivity issues. Read on to learn how you can flush DNS records to clear your DNS cache.
All major operating systems and browsers support DNS cache clearing. The instructions below will teach you how to flush DNS cache entries on macOS, Windows, and Linux devices, as well as the popular Google Chrome browser.
How to clear DNS cache entries on macOS
- Press the smiling blue face icon to open “Finder” and click on “Applications.”
- Open the “Utilities” folder and launch “Terminal.”
- Based on your OS, type in the appropriate command to flush DNS records:
- Tiger (10.4): lookupd -flushcache
- Leopard (10.5): sudo lookupd -flushcache
- Snow Leopard (10.6): sudo dscacheutil -flushcache
- Lion (10.7), Mountain Lion (10.8), Mavericks (10.9): sudo killall -HUP mDNSResponder
- Yosemite (10.10): sudo discoveryutil mdnsflushcache
- El Capitan (10.11), Sierra (10.12), High Sierra (10.13), Mojave (10.14), Catalina (10.15): sudo killall -HUP mDNSResponder
- Big Sur (11), Monterey (12), Ventura (13): sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- Enter your password and press “Enter.” If you are successful, you will see a message stating that you’ve reset your DNS cache.
How to clear DNS cache entries on Windows
To flush DNS records on a Windows device, you will need to use the command prompt. The process is nearly identical for Windows XP, Windows Vista, Windows 7, and later Windows OS. Simply follow these steps:
- Click the “Start” button in the bottom-left corner of your screen.
- Open the command prompt:
- Windows 10, Windows 11: Select “Command prompt” directly from the list.
- Windows XP, Windows Vista, Windows 7, Windows 8: Click “All programs,” select “Accessories,” and choose “Command prompt.”
- In the command prompt window, type the following command: ipconfig /flushdns.
- Press “Enter” to confirm. If you are successful, you will see a message stating that the DNS resolver cache has been flushed.
How to clear DNS cache entries on Linux
The Linux operating system doesn’t come with DNS caching capabilities by default — this feature is implemented differently by each distribution. Here is what you need to do to clear DNS records on the most popular versions:
- Open the terminal by pressing Ctrl, Alt, and T simultaneously.
- Based on your distribution, enter the following command to flush DNS:
- Ubuntu: sudo systemd-resolve –flush-caches
- NCSD: sudo /etc/init.d/nscd restart
- Dnsmasq: sudo /etc/init.d/dnsmasq restart
- BIND: sudo /etc/init.d/named restart
- If prompted, enter your password to confirm that you want to flush DNS cache records.
How to clear DNS cache entries on Google Chrome
Browsers have their own DNS caches, separate from your operating system. If you flush DNS on your device but not your browser, you could still end up using outdated DNS records while browsing. Here’s what you need for a clean start on Google Chrome:
- Open Google Chrome on your device.
- Enter the following in the address bar: chrome://net-internals/#dns
- Click “Clear host cache” to flush DNS records.