How to clear the DNS cache on your computer ?

Clearing your DNS cache after making some DNS changes helps you get the latest version of your website. This article guides you on everything you’d need to know on DNS cache and how to flush it.

So, let’s take a look.

What’s DNS ?

DNS stands for domain name system, and it’s like the internet’s phone book. The system allows you to connect to websites with human-readable domain names instead of their IP addresses—the unique ID of the website’s server.

Every computer on the internet has a unique numerical ID that helps others computers to identify it. Memorizing these strings of numbers for every website we want to visit could be a big deal.

Domain names solve this problem by using easy-to-remember words to match this IP address. Instead of using to connect to Google, you could easily use its domain name

DNS helps you connect to computers using domain names instead of IP addresses.

Understanding DNS Cache

If DNS is the internet’s phone book, then DNS cache is the internet’s phone book saved in your local computer.

When you visit a website on your browser, it first looks for the DNS information in your computer DNS cache. If the browser finds the information, it uses the DNS cache to connect the website; otherwise, it looks up DNS servers across the internets.

When the browser finds the direction on a DNS server, your computer caches the information and saves it in the local DNS cache for subsequent visits.

Local DNS cache helps a browser quickly find a website anytime you visit by taking the shortest route to finding the DNS information.

Why Flushing DNS Cache Matters ?

Purging your local DNS caches forces the browser to initiate a new DNS server lookup

Some of what makes this essential includes:

  • DNS changes are often slow to update on the local cache – flushing the cache ensures you don’t end up seeing the old website or getting an error message. 
  • It helps quickly display an updated version of a website after moving to a new host or domain name changes.
  • Hackers could poison the DNS (DNS spoofing) to redirect you to a malicious website, so regularly purging the cache helps you stay safe.
  • DNS cache could be a target for data collectors.

How to Flush DNS Cache on Local Computers ?

Let’s quickly examine how to purge DNS cache on various computers.

Windows Operating System

Follow these steps to clear DNS cache on Windows computers:

  • Hold the Window key and R to open the Run interface.
  • Type cmd on the search bar and click OK to open the DOS command window.
  • Enter this command on the command prompt ipconfig /flushdns
  • Press the Enter key to execute the command.

You’d receive a confirmation message if the cache purge were successful.

How to clear the DNS cache on your computer ?, Windows Operating System

Note: don’t type the command together. Put a space between ipconfig and the trailing slash (/), or you’ll receive an error.

How to clear the DNS cache on your computer ?, Windows Operating System 2


Open the terminal window to clear the local DNS cache on your macOS computers. Click on Applications, open the ‘Utilities’ folders and then launch the Terminal app.

Use these commands to flush the cache:

  • For OS X Yosemite v10.10.4 or later, copy and run this command on the terminal sudo killall -HUP mDNSResponder
  • For OS X Yosemite v10.10 through v10.10.3: sudo discoveryutil mdnsflushcache
  • For OS X Mavericks, Mountain Lion, and Lion: sudo killall -HUP mDNSResponder
  • For macOS X Snow Leopard: sudo dscacheutil -flushcache

Enter your admin password in the space provided and hit the Return key to execute the command. Your admin password is the same password you use to log in to your computer.

Unlike Windows, macOS doesn’t send notifications when the process executes. However, you could get audio confirmation by adding, say [input the message you want to receive as audio confirmation] to the command.

Here’s an example:

  • sudo killall -HUP mDNSResponder; say dns cleared successfully 

The command clears the macOS local DNS cache and gives you a ‘DNS cleared successfully’ voice confirmation message.

Google Chrome Browser

Google Chrome browser maintains its DNS cache, which is different from the cache your local computer operating system collects. If Chrome is your primary browser, you should also clear its DNS cache after purging your computer.

Type this address chrome://net-internals/#dns in the browser address bar to get started. 

How to clear the DNS cache on your computer ?, Google Chrome Browser

Click on the ‘Clear host cache button to purge the browser DNS cache.

Wrapping It Up

Clearing the local DNS cache on your computer helps you see an updated version of your website or protect it from vulnerabilities. This guide makes it intuitive. Follow the steps to get started immediately.

Don’t hesitate to contact Scalahosting’s customer service if you need support.

Was this helpful?

What’s your goal today?

1. Find the right Managed VPS solution

If you’re looking for industry-leading speed, ease of use and reliability Try ScalaHosting with an unconditional money-back guarantee.

2. Make your website lighting fast

We guarantee to make your WordPress site load in less than 2 seconds on a managed VPS with ScalaHosting or give your money back. Fill out the form, and we’ll be in touch.

Please enter a valid name
Please enter a valid website
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

3. Streamline your clients’ hosting experience

If you’re a web studio or development agency hosting more than 30 websites, schedule a call with Vlad, our co-founder and CTO, and see how we can deliver unmatched value to both your business and your clients.


Need a custom cluster or professional advice?

Book a meeting and get a free 30-minute consultation with Vlad, co-founder & CTO of Scala Hosting, who will help you select, design and build the right solution - from a single data center cluster to a multi-region & multi-datacenter high availability cluster with hundreds of servers.

Book a free consultation

4. Learn how to grow your website in 2024

An all-star team of SEO and web influencers are sharing their secret knowledge for the first time in years. Learn about the future of SEO, Web Design best practices and the secrets to getting the foundation for your website to thrive. Watch the exclusive webinar.

An Exclusive Insiders Look Behind The SEO and Web Development Curtain


Working in the web hosting industry for over 13 years, Rado has inevitably got some insight into the industry. A digital marketer by education, Rado is always putting himself in the client's shoes, trying to see what's best for THEM first. A man of the fine detail, you can often find him spending 10+ minutes wondering over a missing comma or slightly skewed design.