How To Flush DNS Cache — A Full Step-by-Step Guide (2024)

DNS cache is crucial in speeding up internet access and improving browsing experiences by storing recent domain name lookups and their corresponding IP addresses.

Clearing this cache periodically can enhance your browsing speed and resolve connectivity issues.

Modern operating systems generally cache DNS lookup results and IP addresses to process requests more quickly. Whenever you write a URL in your browser, it sends a request to the DNS servers to “locate” the site. But instead of sending that request every single time, the browser often caches the information. This way, the next time you type in that address, the browser looks it up through the DNS cache, allowing it to return the results much faster.

However, cached DNS records can become outdated or corrupted over time, potentially leading to browsing issues, including connection errors or the display of outdated website versions. Flushing your DNS cache occasionally is a good practice to ensure you’re accessing up-to-date versions of websites and protecting yourself from security risks like DNS spoofing.

In this article we will explain how to flush the DNS cache on different operating systems, including Windows, macOS, and Linux, as well as detailing the several reasons why it is so important to flush the DNS regularly.

How to Flush DNS on Different Operating Systems

How to Flush DNS on Windows 10 & 11

If you’re using Windows 10 or 11, here are the steps you can follow to flush the DNS cache:

  1. Click on Start, then search for Command Prompt. Right-click it and select “Run as Administrator.”
  2. Once the Command Prompt is open, type ipconfig /flushdns and press Enter.
  3. A message will appear confirming that the DNS Resolver Cache was flushed.
How To Flush DNS Cache — A Full Step-by-Step Guide (1)

In addition to flushing the DNS, performing an IP release and renewal can help resolve network connection problems. Here’s how to do it:

How to Perform an IP Release, Renew, and DNS Flush on Windows

  1. Open Command Prompt with administrative privileges.
  2. Type ipconfig /release and press Enter to release the current IP address.
  3. Next, type ipconfig /renew to obtain a new IP address.
  4. Finally, type ipconfig /flushdns to clear the DNS cache.

How to Flush DNS on macOS

Flushing the DNS cache on macOS involves using the Terminal app. Follow these steps:

  1. Press cmd + space to open Spotlight Search.
  2. Type Terminal and open the application (you can also find it in the Other section in the Launchpad).
  3. Type the following command: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder.
  4. Enter your administrator password when prompted. Once you do, you will receive confirmation that the DNS cache has been flushed.

Note: The command can vary depending on your macOS version. Here’s how to check your macOS version:

  1. Click on the Apple menu in the upper-left corner of your screen.
  2. Select About This Mac.

Depending on your macOS version, use the appropriate command:

  • Monterey, Big Sur, Catalina: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  • Mojave, High Sierra, Sierra, El Capitan, Mavericks, Mountain Lion, Lion: sudo killall -HUP mDNSResponder

How to Flush DNS on Linux

If you’re using a Linux distro such as Ubuntu, here’s how to flush the DNS cache:

  1. Open the terminal by pressing Ctrl + Alt + T or searching for “Terminal” in the Activities menu.
  2. Run the following command:
    • If you are running Ubuntu 20.04 LTS or older, use: sudo systemd-resolve --flush-caches.
    • If you are running Ubuntu 22.04 LTS or newer, use: sudo resolvectl flush-caches.
  3. Enter your administrator password when prompted, and the DNS cache will be flushed.
How To Flush DNS Cache — A Full Step-by-Step Guide (2)

How to Flush DNS Cache in Google Chrome

If you experience issues accessing websites on Google Chrome, your browser’s DNS cache may also need to be flushed. Here’s how to do it:

  1. Type chrome://net-internals/#dns in the address bar and press Enter.
  2. Click the Clear Host Cache button to flush the browser’s DNS cache.
How To Flush DNS Cache — A Full Step-by-Step Guide (3)

This action will ensure that Chrome fetches fresh DNS data from the websites you visit.

Why Should You Flush Your DNS Cache?

There are several reasons why flushing the DNS cache periodically is important:

Resolve DNS Errors

If you’re encountering issues such as DNS_PROBE_FINISHED_NXDOMAIN or CONNECTION_TIMED_OUT, flushing the DNS cache may help resolve the problem. These errors often arise due to outdated or incorrect DNS information.

Speed Up DNS Propagation

After making changes to your DNS records, such as transferring a domain to a new hosting provider, DNS propagation can take time to fully update across the internet. Flushing your DNS cache ensures that your device picks up these changes more quickly, allowing you to see the updates sooner.

Prevent DNS Spoofing

DNS spoofing (or poisoning) occurs when an attacker manipulates DNS cache entries to redirect users to fraudulent or malicious websites. Flushing your DNS cache helps mitigate this risk by clearing any potentially corrupted entries.

Avoiding 404 Errors

A 404 error might indicate that your system is pulling up an outdated version of a website. Flushing the DNS cache ensures that your browser accesses the most current version of the site, which can help you avoid such errors.

Remove Old DNS Data

When you change DNS providers, such as switching to Google DNS or OpenDNS, it’s important to flush your DNS cache. This ensures that your system doesn’t use outdated data from the previous provider, helping to prevent connectivity issues.

After Action Report – Flush Your DNS Cache Periodically

Flushing your DNS cache is a simple yet effective way to resolve connectivity issues, speed up website access, and prevent security risks like DNS spoofing. Whether you’re using Windows, macOS, Linux, or even just browsing on Google Chrome, clearing your DNS cache periodically is a good habit to ensure optimal performance.

Do you regularly flush your DNS cache? Let us know if you have any tips or questions! Join the conversation below by leaving a comment! 💬

Wrapping Up

RunCloud is a powerful and easy-to-use platform that helps you manage your websites on any cloud server. With RunCloud, you don’t need to be a Linux expert to set up, secure, and optimize your web applications. You can do everything from a simple and intuitive dashboard, saving you time and hassle.

RunCloud supports various web servers, PHP versions, databases, and frameworks. You can also monitor your server performance, back up your data, and automate your tasks with RunCloud. Whether you are a developer, a freelancer, or a business owner, RunCloud can help you run your websites faster and smoother.

What are you waiting for? Join RunCloud today and enjoy the best web hosting solution for your websites. It’s free for 7 days, no strings attached!

Frequently Asked Questions (FAQ)

Is clearing the DNS cache safe?

Clearing the DNS cache is safe and does not affect your saved passwords, browser history, or other personal data. It removes outdated DNS information, ensuring your computer can fetch up-to-date DNS records.

How often should I flush my DNS cache?

There’s no hard rule on how often you should flush the DNS cache, but it’s a good idea to do it when you experience connection issues or DNS errors or after making changes to your network configuration (such as switching DNS providers).

Does flushing the DNS cache affect my internet speed?

Flushing the DNS cache may temporarily slow down website access on the first visit, as the DNS lookup will need to be performed again. However, once the cache is refreshed, your browser will store the new DNS records, which can speed up access to frequently visited websites.

How do I know if my DNS cache was successfully flushed?

After running the appropriate command to flush the DNS cache (such as ipconfig /flushdns on Windows), your system usually displays a message confirming that the DNS Resolver Cache was successfully flushed.

Will clearing the DNS cache fix DNS errors?

In many cases, yes. If you encounter errors like DNS_PROBE_FINISHED_NXDOMAIN or CONNECTION_TIMED_OUT, flushing the DNS cache can help resolve these problems by removing outdated or corrupted DNS entries.

How To Flush DNS Cache — A Full Step-by-Step Guide (2024)

FAQs

How do I flush DNS step by step? ›

Windows
  1. On the taskbar search, type "Command Prompt."
  2. Right click on Command Prompt and press "run as administrator."
  3. When asked whether to allow Command Prompt to make changes to your computer, select Yes.
  4. Open Command Prompt.
  5. Type the command ipconfig /flushdns then press enter.

How do I clear my 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

How do I clear DNS cache internals? ›

Flushing the DNS cache in Chrome

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

How do I delete all DNS history? ›

Launch chrome browser. Type chrome://net-internals/#dns in the address bar, then press Enter. Click on Clear host cache button. Chrome Browser DNS cache will be cleared.

How do I reset my DNS? ›

To reset your DNS in Windows:
  1. Using the Start Menu at the lower left corner of your screen: ...
  2. Enter CMD into the text box and then select the Command Prompt program.
  3. A new black window will appear. ...
  4. Type ipconfig /flushdns and press ENTER (please note: there is a space between ipconfig and /flushdns)
  5. Restart your computer.

How do I flush DNS on my device? ›

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.

Is it OK to flush DNS cache? ›

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 long does it take for DNS cache to clear? ›

The process of flushing your DNS cache takes approximately 15 minutes and has no negative impact, so you may clear yours as frequently as you like.

Does clearing DNS cache delete passwords? ›

It will not clear anything other than your DNS cache, hence everything else will be where it was (passwords, auto-fill, etc). The purpose of DNS is to resolve hostnames (such as google.com) and convert it to its IP address (172.217. 12.46 in my case). Your cache will simply repopulate itself once you revisit a website.

How to clear cache? ›

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 clear bind DNS cache? ›

To clear the binddns cache:
  1. Open a Terminal window. The default keyboard shortcut is Ctrl + Alt + T .
  2. Execute the following commands: sudo /etc/init.d/named restart. sudo rndc restart. sudo rndc exec.

Can I see DNS history? ›

Type cmd in the Start menu search bar to open Command Prompt. Then click Run as administrator. Enter the command ipconfig/displaydns and hit Enter. You'll see your detailed DNS cache history.

How do I delete all DNS records? ›

Find your username or password.) Select an individual domain to access the Domain Settings page. Select DNS to view your DNS records. Select the checkboxes next to the DNS records you need to delete and then select Delete.

How to clear cache on DNS server? ›

Windows operating systems
  1. Open a DOS command window. To do this, click Start, click Run, type cmd, and then press Enter.
  2. At the command prompt, type the following command and then press Enter: Copy ipconfig /flushdns.
  3. The DNS cache is now clear.

How do I clear DNS cookies? ›

To clear your DNS cache if you use Windows, perform the following steps:
  1. Click Start or the Windows icon.
  2. In the search text box, enter cmd .
  3. Right-click Command Prompt and select Run as Administrator.
  4. Run the following command: ipconfig /flushdns.
Jun 17, 2024

How do I flush my DNS IP address? ›

To release/renew your IP address, and flush DNS on Windows:
  • Search box "Commend prompt"
  • Type "ipconfig /release" and press Enter.
  • Type "ipconfig /renew" and press Enter.
  • Type "ipconfig /flushdns" and press Enter.
  • Restart the computer.
Feb 7, 2022

Is flushing your DNS safe? ›

Flushing the DNS cache is considered a safe and effective measure for resolving internet connectivity issues. This procedure is akin to routine maintenance for your network settings, devoid of adverse effects on system performance or security.

What is the difference between DNS flush and clear cache? ›

ipconfig /flushdns will flush the local computer cache. And dnscmd /clearcache will clear the dns server cache. With the former you will clear the "local" cache of the server you work on. It will NOT clear the dns server cache.

How often should you flush DNS cache? ›

The process of flushing your DNS cache takes approximately 15 minutes and has no negative impact, so you may clear yours as frequently as you like.

Top Articles
Top publicly traded Bitcoin mining companies by earnings
The 20 Most Expensive Sold NFTs In The World
Katie Pavlich Bikini Photos
Gamevault Agent
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
Things To Do In Atlanta Tomorrow Night
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Walgreens Alma School And Dynamite
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Dmv In Anoka
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Rogold Extension
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Weekly Math Review Q4 3
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Free Carnival-themed Google Slides & PowerPoint templates
Otter Bustr
Selly Medaline
Latest Posts
Article information

Author: Delena Feil

Last Updated:

Views: 6099

Rating: 4.4 / 5 (65 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Delena Feil

Birthday: 1998-08-29

Address: 747 Lubowitz Run, Sidmouth, HI 90646-5543

Phone: +99513241752844

Job: Design Supervisor

Hobby: Digital arts, Lacemaking, Air sports, Running, Scouting, Shooting, Puzzles

Introduction: My name is Delena Feil, I am a clean, splendid, calm, fancy, jolly, bright, faithful person who loves writing and wants to share my knowledge and understanding with you.