How to Flush DNS Cache (Windows, Mac, Chrome) (2024)

Troubleshooting your website can be an intimidating responsibility. When it comes to tasks like flushing your Domain Name Server (DNS) cache, it’s easy to get overwhelmed and confused before you’re even started.

Fortunately, you can perform this particular duty quickly and easily, even with little to no technical experience. In two short steps, your DNS cache will be clear, and you can continue working to resolve whatever issue you happen to be facing.

In this post, we’ll explain what a DNS cache is and in what situations you might need to clear yours. We’ll then share a real-world example from our direct experience, and explain how to carry out this troubleshooting step no matter what hardware you’re using.

Prefer to watch the video version?

An Introduction to DNS Caching

In order to understand why you may need to flush your DNS cache, there are several components we need to break down.

First, the Domain Name System (DNS)is an index of all the websites on the internet and their IP addresses. You can think of it as a directory or phone book for websites. As for ‘caching’, it’s the process of saving a snapshot of something (such as a web page) so it can be reloaded faster in the future.

So, DNS caching involves your Operating System (OS) or browser capturing recently-visited IP addresses and saving them in a database. This enables your browser to reload sites you’ve visited in the past more quickly than if it had to reference the DNS again each time.

Unfortunately, your DNS cache may become corrupted, leading you into phishing schemes. It can also simply become outdated or create internet connectivity issues. In any of these situations, clearing your DNS cache can often help you resolve the problem and get back online.

A DNS Cache Case Study

To illustrate the point further, let’s look at an example that actually happened to a Kinsta client’s website.

The client reached out to us because their images, CSS, and JavaScript weren’t loading correctly on their website.

The site appeared to be loading just fine for us, however, and the client hadn’t made any recent changes. Upon inspecting their site with Chrome Devtools,we could see that everything coming from their CDN subdomain (cdn.domain.com) wasn’t loading correctly, and instead was reporting 404 errors.

The first thing we did was ping the CDN subdomain to see if we could access it. It returned a response just as expected. We then ran the client’s CDN URL through the free whatsmydns tool.

This tool enables users to quickly check the resolution on DNS records (such as the CDN CNAME) from multiple geographical locations. We wanted to ensure that the site was loading fine everywhere, beyond just our physical location, and that it was resolving back to the client’s CDN provider.

The results showed that it was:

How to Flush DNS Cache (Windows, Mac, Chrome) (1)

After all this digging, we confirmed that there was a small change with the client’s DNS provider that was still cached on their end. We asked them to clear their DNS cache locally on their computer and refresh the page.

At that point, everything started loading normally on their WordPress site again.

Knowing how to clear your DNS cache could help you in many similar situations, it can fix errors like 304. Let’s take a look at how it’s done.

What Is Cache? Learn This Common and Complex Technology

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

Clearing your DNS cache is a relatively simple process, but it varies depending on your OS. It also matters whether you need to flush it from your computer or your browser. Below, we’ve explained how to carry out this task for the macOS, Windows, and Linux Operating Systems (OSs), as well as on the Google Chrome browser.

  • macOS
  • Windows
  • Linux
  • Chrome

1. How to Clear DNS Cache on macOS

In order to clear the DNS cache on a Mac, you’ll need to open the native command-line interface known as Terminaland run the appropriate command. This process varies based on which version of macOS you’re running.

If you’re not sure what version you’re working with, click on the ‘apple’ icon in the top-left corner of your desktop, and select About This Mac:

How to Flush DNS Cache (Windows, Mac, Chrome) (2)

Your current version will be the first piece of information listed:

How to Flush DNS Cache (Windows, Mac, Chrome) (3)

Once you know this information, you can follow the relevant steps below.

macOS El Capitan (10.11), Sierra (10.12), High Sierra (10.13), Mojave (10.14), and Catalina (10.15)

If you’re working on macOS version 10.11 or above, open the command line interface by clicking on Go > Utilities:

How to Flush DNS Cache (Windows, Mac, Chrome) (4)

Then select Terminal. Once it opens, run the following command:

sudo killall -HUP mDNSResponder

You’ll be prompted to enter your computer password:

How to Flush DNS Cache (Windows, Mac, Chrome) (5)

After you’ve done so, your DNS cache should be clear.

macOS Yosemite (10.10)

You can access Terminal by the same method described above for any macOS version. In Yosemite (10.10), once the window opens you’ll need to run the following command:

sudo discoveryutil udnsflushcaches

Enter your computer’s password and the DNS cache should successfully flush.

macOS Lion (10.7), Mountain Lion (10.8), and Mavericks (10.9)

For macOS versions 10.7 to 10.9, open up Terminal and run the following command to clear your DNS cache:

sudo killall -HUP mDNSResponder

You may notice that this is the same command used by versions 10.11 and above. Enter your password to execute it.

macOS Snow Leopard (10.6)

If you’re running macOS Snow Leopard (10.6), open Terminal and input this command:

sudo dscacheutil -flushcache

Then, enter your password to finish clearing the DNS cache.

macOS Leopard (10.5)

Finally, macOS Leopard (10.5) users should run the following command in Terminal:

sudo lookupd -flushcache

Once you enter your password, the DNS cache should be flushed.

Clearing your DNS cache is also the solution for fixing the ERR_SPDY_PROTOCOL_ERROR.

2.How to Clear DNS Cache on Windows

Flushing your DNS cache on a Windows computer is fairly simple. Here’s how to accomplish this task on Windows 10, 8, 7, and XP.

Windows 10

To clear your DNS cache on a Windows OS, you’ll need to open Command Prompt, the system’s command line interface. You can access this program in Windows 10 by clicking on the Startbutton. Then navigate to Windows Systems > Command Prompt:

How to Flush DNS Cache (Windows, Mac, Chrome) (6)

Once the command line interface is open, enter the following line:

ipconfig /flushdns

This command should return a confirmation that the DNS cache has been successfully flushed:

How to Flush DNS Cache (Windows, Mac, Chrome) (7)

You can then close the Command Prompt window.

Windows 8

Clearing your DNS cache in older versions of Windows requires the same command ipconfig /flushdns. However, the steps for accessing Command Prompt are slightly different between versions.

In Windows 8, open the Appsscreen. On the far right side, find Windows Systemsand select Command Prompt.

Once the program opens, run ipconfig /flushdns. You should receive a confirmation once the DNS cache has been cleared successfully.

Windows 7 and Windows XP

In Windows 7 or Windows XP, click on the Startbutton. Navigate to All Programs > Accessoriesand select Command Prompt.

In the command line interface, run ipconfig /flushdns. You should receive a confirmation message once the DNS cache is flushed.

3. How to Clear DNS Cache onLinux

Flushing your DNS cache on Linux machines is fairly similar to the process of doing so on a Mac or Windows computer. Here’s how.

Ubuntu

Linux uses Terminal as its command line interface, just like macOS. To open it, click on Activitiesin the top-left corner of your desktop This will provide you with a search bar, where you can enter “terminal” to find and launch the program.

Once the command line interface is open, execute this command:

sudo systemd-resolve --flush-caches

Terminal will then prompt you for your password. Enter it to finish executing the command and flushing your DNS cache.

Other Distributions

If you’re using a Linux distribution other than Ubuntu, you can flush your DNS cache by opening your command line interface and running this command:

sudo /etc/init.d/dns-clean start

Once the command is executed, your cache should be clear.

4. How to Clear DNS Cache onGoogle Chrome

Finally, as we mentioned at the beginning of this post, you may have cause to clear your browser’s DNS cache rather than your OS’s. In Google Chrome, you can do so by entering the following into the address bar:

chrome://net-internals/#dns

Then click on the Clear host cachebutton:

How to Flush DNS Cache (Windows, Mac, Chrome) (8)

This should flush Chrome’s DNS cache for you.

Need to clear your browser’s cache? Make sure to check out: How to Clear Browser Cache for All Major Browsers.

Summary

The prospect of clearing your DNS cache may sound daunting, especially if you’re new to troubleshooting internet connectivity or other website issues. Fortunately, the actual process is fairly straightforward.

Flushing your DNS cache only requires a few steps. First, you need to know what OS and version you’re using. Then, you can follow the relevant steps above and clear the DNS cache by entering one or two simple commands.

How to Flush DNS Cache (Windows, Mac, Chrome) (2024)

FAQs

How to Flush DNS Cache (Windows, Mac, Chrome)? ›

How to flush DNS cache on Chrome: Use chrome://net-internals/#dns. You can flush the DNS cache on Chrome from within the browser. Launch Chrome, type “chrome://net-internals/#dns” into the address bar, and click Enter on your keyboard. On the page that opens, click the Clear host cache button to clear the DNS cache.

How to clear your DNS cache in Mac Windows chrome? ›

How to flush DNS cache on Chrome: Use chrome://net-internals/#dns. You can flush the DNS cache on Chrome from within the browser. Launch Chrome, type “chrome://net-internals/#dns” into the address bar, and click Enter on your keyboard. On the page that opens, click the Clear host cache button to clear the DNS cache.

How do I flush DNS cache on Mac? ›

Open the built-in Console log-viewer app on your Mac and type any:mdnsresponder into the search bar. Then, launch Terminal, type in sudo killall –INFO mDNSResponder, and press Enter or Return. Back in the Console app, you can view a list of cached DNS records. How do I clear the DNS cache on Windows 10?

How do I flush DNS on Windows chrome? ›

In Chrome, go to 'chrome://net-internals/#dns' and click on the 'Clear host cache' button to clear the DNS cache.

How do I clear my cache on my Mac in chrome? ›

In Chrome
  1. On your computer, open Chrome.
  2. At the top right, click More. Delete browsing data.
  3. Choose a time range, like Last hour or All time.
  4. Select the types of information you want to remove.
  5. Click Delete data. If you delete cookies while signed in to Chrome, you won't be signed out of your Google Account.

How to flush Windows DNS cache? ›

To Flush the DNS Cache:
  1. 1.At the bottom left corner, type 'cmd' in the Start menu's search bar, and press Enter.
  2. Type 'ipconfig /flushdns' in the Command Prompt, and press Enter.
  3. The user has now flushed the DNS Cache and will receive a message that they have successfully done so.
Aug 3, 2023

Is it safe to flush DNS? ›

Flushing DNS is a straightforward yet potent method for resolving many internet connectivity issues. It's a safe procedure and can often be the initial step in troubleshooting network problems. Regular flushing of your DNS cache can also be a prudent practice for maintaining privacy and security online.

How do I reset my DNS settings on a Mac? ›

macOS
  1. Go to System Preferences .
  2. Click on Network .
  3. Select the first connection in your list and click Advanced .
  4. Select the DNS tab.
  5. Select any addresses in the list and attempt to remove them using the - button. ...
  6. Click OK and exit all the windows.

How do I delete DNS addresses from my Mac? ›

Select your active Internet Adapter (Airport if Wireless or Ethernet if Wired). Click Advanced. Nagivate to the DNS tab, select the DNS addresses that appears in the DNS field. Click on the minus (-) button to remove them.

How do I manage DNS on Mac? ›

On your Mac, use DNS network settings to enter DNS servers and search domains. Learn how to enter DNS servers and search domains. To change these settings, choose Apple menu > System Settings, click Network in the sidebar, click a network service on the right, click Details, then click DNS.

How to find DNS cache in Google Chrome? ›

For example, if you're using Chrome, you can enter: chrome://net-internals/#dns into your address bar which will return your browser's current list of cached DNS records.

How do I clear the host cache in chrome? ›

Open Chrome. In the URL bar type in chrome://net-internals/#dns. In the left pane click DNS. In the right pane click Clear host cache.

How do I fix DNS in chrome? ›

If you see a DNS (Domain Name System) error, try switching to one of Google's public name servers:
  1. Make sure your Chromebook is connected to a Wi-Fi network.
  2. At the bottom right, select the time.
  3. Select the Wi-Fi Network .
  4. From the drop-down menu, select your wireless network name.
  5. Select Network.

How do I clear DNS cache on Mac Chrome? ›

Clear Local DNS Cache on Mac
  1. Navigate to Finder, hover over the Go tab, then select the Utilities option in the drop-down list.
  2. Select the Terminal option.
  3. A Terminal window will open on your local machine.
  4. Within the prompt, type "sudo killall -HUP mDNSResponder && echo macOS DNS Cache Reset"
Oct 20, 2023

How do I clear my cache faster on Mac? ›

In Safari, it is Option + Command + E. If it doesn't work for your Mac, check what it is by clicking Develop in the menu bar with Safari open and looking next to Empty Caches. For Chrome and Firefox, it is Command + Shift + Delete. It should bring up the Clear data window.

How do you clear DNS history on Mac? ›

How to Clear DNS Cache For Your MacOS Version
MacOS VersionCommand
OS X 10.11 (El Capitan)sudo killall -HUP mDNSResponder
OS X 10.10 (Yosemite)sudo discoveryutil udnsflushcaches
OS X 10.9 (Mavericks)sudo killall -HUP mDNSResponder
OS X 10.8 (Mountain Lion)sudo killall -HUP mDNSResponder
10 more rows
Apr 21, 2022

How do I clear certificate cache in chrome Mac? ›

Mac OSX
  1. Open Google Chrome.
  2. Click on the drawer icon to the top of the right of the page.
  3. Open the History menu, then click theHistory option from this menu.
  4. Click Clear Browser Data.
  5. Set the Time Range to All Time.
  6. Click Clear Data.

Where is the DNS cache in chrome? ›

For example, if you're using Chrome, you can enter: chrome://net-internals/#dns into your address bar which will return your browser's current list of cached DNS records.

How do I remove DNS settings from my Mac? ›

Change DNS settings on Mac
  1. Add a DNS server to the list: Click the Add button at the bottom of the DNS servers list, then enter an IPv4 or IPv6 address.
  2. Remove a DNS server from the list: Select a server in the list, then click the Remove button at the bottom of the DNS servers list.

Top Articles
Customer Authentication | Crypto.com Help Center
Tapeworms. How to protect yourself from them and what should be done? - Bonum.lt
Tmf Saul's Investing Discussions
Craigslist Monterrey Ca
Otterbrook Goldens
Gore Videos Uncensored
His Lost Lycan Luna Chapter 5
King Fields Mortuary
Weather Annapolis 10 Day
Toonily The Carry
Missing 2023 Showtimes Near Lucas Cinemas Albertville
Tiger Island Hunting Club
4156303136
Taylor Swift Seating Chart Nashville
Assets | HIVO Support
Enderal:Ausrüstung – Sureai
Restaurants Near Paramount Theater Cedar Rapids
Chile Crunch Original
Cvs Appointment For Booster Shot
Payment and Ticket Options | Greyhound
Cpt 90677 Reimbursem*nt 2023
Idaho Harvest Statistics
Praew Phat
How pharmacies can help
Missed Connections Inland Empire
Zack Fairhurst Snapchat
Never Give Up Quotes to Keep You Going
Morse Road Bmv Hours
Target Minute Clinic Hours
Lexus Credit Card Login
Dei Ebill
The Banshees Of Inisherin Showtimes Near Broadway Metro
Relaxed Sneak Animations
35 Boba Tea & Rolled Ice Cream Of Wesley Chapel
The Ultimate Guide to Obtaining Bark in Conan Exiles: Tips and Tricks for the Best Results
A Small Traveling Suitcase Figgerits
CVS Near Me | Somersworth, NH
Soulstone Survivors Igg
Instafeet Login
Puretalkusa.com/Amac
Callie Gullickson Eye Patches
Cuckold Gonewildaudio
Rescare Training Online
VerTRIO Comfort MHR 1800 - 3 Standen Elektrische Kachel - Hoog Capaciteit Carbon... | bol
bot .com Project by super soph
Theatervoorstellingen in Nieuwegein, het complete aanbod.
Used Sawmill For Sale - Craigslist Near Tennessee
Phunextra
Ics 400 Test Answers 2022
Service Changes and Self-Service Options
Mazda 3 Depreciation
Latest Posts
Article information

Author: Arielle Torp

Last Updated:

Views: 5696

Rating: 4 / 5 (41 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Arielle Torp

Birthday: 1997-09-20

Address: 87313 Erdman Vista, North Dustinborough, WA 37563

Phone: +97216742823598

Job: Central Technology Officer

Hobby: Taekwondo, Macrame, Foreign language learning, Kite flying, Cooking, Skiing, Computer programming

Introduction: My name is Arielle Torp, I am a comfortable, kind, zealous, lovely, jolly, colorful, adventurous person who loves writing and wants to share my knowledge and understanding with you.