How to Flush DNS Cache (2024)

DNS

Jan 23, 2024

Jordana A. & Astari S.

5min Read

How to Flush DNS Cache (1)

If you have connection issues, flushing your domain name system (DNS) cache could be the solution you need. However, while a DNS cache can speed up loading times, it might also pose security risks.

Each operating system requires a different process to flush the DNS cache. This tutorial will guide you through the steps on Windows, macOS, and Linux versions. We’ll also show you how to do it in Google Chrome.

Lastly, we’ll explain the benefits of regularly flushing your DNS cache.

How to Flush DNS Cache (2)

Video Tutorial

Learn how to flush DNS cache and improve your security and connection with our video tutorial.

What Is DNS Cache?

DNS cache is a temporary storage of previous DNS lookups in your operating system. When searching for a specific address online, your web browser and operating system will cache the IP address and DNS records.

This method streamlines the DNS lookup process by resolving domains to their IP addresses, making web pages load faster for the next visit. A DNS cache consists of compressed information units called resource records (RR) about all visited websites, displayed in ASCII code.

The following are DNS cache’s components, which is often found in the DNS Zone Editor:

  • Resource data ‒ contains a record’s description, such as the address and hostname.
  • Record type ‒ describes the record’s type (A or AAAA record).
  • Record name ‒ showcases the DNS entry’s domain name.
  • Time-to-live (TTL) ‒ resource record’s validity time measured in seconds.
  • Class ‒ resource record’s appropriate protocol group.
  • Resource data length ‒ refers to the resource data’s value.

How to Flush DNS Cache

Depending on your operating system, the steps to flushing a DNS cache may vary. The tutorial below will show you how to do it on Windows, Linux, and Mac OS X.

How to Flush DNS DNS Cache in Microsoft Windows XP, 7, Vista, 8, 8.1 or 10

With Windows, the process to flush your DNS cache will be the same for most versions. Keep in mind that you need to use the Run as administrator option when executing the command prompt to access all system security permissions:

  1. Use the Windows + R shortcut to open the Run window.
  2. Type cmd to open Windows Command Prompt.
  3. Type the following command and hit Enter:
ipconfig /flushdns
  1. Windows will automatically clear your DNS cache files and reset the DNS resolver cache. If the process is successful, you’ll see the following confirmation message in your Command Prompt console:

Important! Run the cmd command by pressing Ctrl + Shift + Enter to use the Run as administrator option more quickly. Please note that you will need admin rights to do so.

How to Flush DNS Cache in macOS 11 Big Sur, 12 Monterey, and Older Versions

With macOS, make sure to run the correct flush DNS command based on your current OS version. Therefore, the first step is to check your macOS version by clicking on the Apple icon -> About This Mac.

Next, open the command terminal window by pressing the F4 key and entering terminal in the Spotlight search field. Then, insert the command specific to your macOS version and press Enter. If prompted, insert your admin password and click Enter key again to clear your DNS cache.

Here are the specific commands for each version:

macOS 11 Big Sur or 12 Monterey:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

macOS 10.11 El Capitan, 10.12 Sierra, 10.13 High Sierra, 10.14 Mojave, or 10.15 Catalina:

sudo killall -HUP mDNSResponder

macOS 10.10 Yosemite:

sudo discoveryutil udnsflushcaches

macOS 10.7 Lion, 10.8 Mountain Lion, or 10.9 Mavericks:

sudo killall -HUP mDNSResponder

macOS 10.6 Snow Leopard:

sudo dscacheutil -flushcache

macOS 10.5 Leopard:

sudo lookupd -flushcache

How to Flush DNS Cache in Linux

Unlike Windows and macOS, Ubuntu does not cache DNS records by default. If you manually install a DNS service, you will need to flush the DNS cache on your computer.

To clear your DNS cache using Linux, press Ctrl + Alt + T keys together to open the Terminal application.

In the terminal window, enter the required command based on the service your Linux system is running. Here are the commands for Name Service Cache Daemon (nscd) and systemd.

How to Flush DNS Cache With nscd

Enter the following command line to clear DNS cache files on the init.d subdirectory:

sudo /etc/init.d/nscd restart

How to Flush DNS Cache With systemd

Use the following command line:

systemd-resolve --flush-caches

Then, enter the following command to check whether the previous command has successfully flushed the DNS cache.

systemd-resolve --statistics

How to Flush DNS Cache in Google Chrome

Google Chrome stores a separate DNS cache from the operating system. It is also essential to flush your DNS cache in Google Chrome if it is your default web browser to avoid connection errors.

Important! Keep in mind that this cache type is different from the browser cache.

Here are the steps to flush the DNS cache in Google Chrome:

  1. Open Google Chrome and enter the following line into the address bar:
chrome://net-internals/#dns
  1. Near the Host resolver cache option click Clear host cache.

Important! Use edge://net-internals/#dns if you’re using Microsoft Edge.

Reasons to Flush DNS Cache Periodically

Most operating systems perform DNS caching to lessen the DNS servers’ burden during high traffic. Its TTL determines the cache’s validity period. As long as the cache files are still valid, operating systems will answer content requests without going through the DNS server.

However, corrupt or outdated DNS cache files can lead to errors and security vulnerabilities. For example, your operating system may store a bad DNS cache when a site just moved to a new domain or host.

Therefore, here are some of the main benefits of flushing your DNS cache regularly:

  • Prevent search behavior tracking ‒ storing DNS records makes it easier for hackers to track your online searches.
  • Improve security ‒ avoid exposing sensitive information – such as login credentials and personal data – from DNS spoofing.
  • Solve technical problems ‒ forcing the operating system to search updated DNS records can help fix connection issues and incorrectly displayed web content.

Conclusion

When experiencing connection issues or seeing incorrectly displayed web pages, your system might be storing corrupted or outdated DNS cache records. You can quickly solve it by using flush DNS command. If doing so doesn’t resolve the problem, try to clear your web browser cache instead.

We hope you find this article helpful in solving DNS server issues. Good luck.

How to Flush DNS Cache FAQ

Is It Safe to Flush DNS Cache?

Yes –flushing your DNS cache has no negative side effects. All it does is remove any addresses that are outdated or, in another way, invalid.

How Often Should I Flush my DNS Cache?

It takes 15 minutes for DNS cache to fully clear. While there’s no set frequency for DNS cache flushing, we recommend doing it frequently for the best browsing experience.

Does Clearing DNS Cache Speed Up My Internet?

Flushing DNS cache doesn’t greatly affect your internet speed. You’ll get rid of outdated cached data, but it might take a bit longer directly after the DNS cache flush to load different web pages, as the browser needs to re-fetch and re-cache the data.

Does Restart Clear DNS Cache?

Yes. If you reboot the DNS server, all cache is cleared automatically.

How to Flush DNS Cache (8)

The author

Jordana Alexandrea

Jordana is a Senior Content Writer with over 5 years of experience in digital marketing and web development. When she’s not busy with work, she dabbles in creative writing and movie reviewing. Follow her on LinkedIn.

More from Jordana Alexandrea

How to Flush DNS Cache (9)

The Co-author

Astari S.

Astari is a digital marketing expert, with a focus on SEO and WordPress. She loves to share her wealth of knowledge through her writing, and enjoys surfing the internet for new information when she's not out in the waves or hiking a mountain. Her mission is to learn something new every day, and she firmly believes that there is no such thing as too much knowledge.

More from Astari S.

How to Flush DNS Cache (2024)
Top Articles
Ash's 20 Rarest Pokémon
Citing Sources
AllHere, praised for creating LAUSD’s $6M AI chatbot, files for bankruptcy
Alan Miller Jewelers Oregon Ohio
Craigslist Furniture Bedroom Set
His Lost Lycan Luna Chapter 5
Lost Pizza Nutrition
Dityship
104 Presidential Ct Lafayette La 70503
Wunderground Huntington Beach
Blog:Vyond-styled rants -- List of nicknames (blog edition) (TouhouWonder version)
Craigslist Pets Athens Ohio
Illinois Gun Shows 2022
1-833-955-4522
Obsidian Guard's Cutlass
The Exorcist: Believer (2023) Showtimes
Virginia New Year's Millionaire Raffle 2022
Royal Cuts Kentlands
Persona 4 Golden Taotie Fusion Calculator
2024 INFINITI Q50 Specs, Trims, Dimensions & Prices
Decosmo Industrial Auctions
Marine Forecast Sandy Hook To Manasquan Inlet
12 Top-Rated Things to Do in Muskegon, MI
What Individuals Need to Know When Raising Money for a Charitable Cause
Carroway Funeral Home Obituaries Lufkin
Craigslist Brandon Vt
Delta Math Login With Google
Restored Republic
Our 10 Best Selfcleaningcatlitterbox in the US - September 2024
Dailymotion
Mrstryst
Persona 4 Golden Taotie Fusion Calculator
Roadtoutopiasweepstakes.con
Stolen Touches Neva Altaj Read Online Free
Whas Golf Card
Powerball lottery winning numbers for Saturday, September 7. $112 million jackpot
Chattanooga Booking Report
Exploring The Whimsical World Of JellybeansBrains Only
Despacito Justin Bieber Lyrics
Ishow Speed Dick Leak
Caderno 2 Aulas Medicina - Matemática
Planet Fitness Lebanon Nh
Hell's Kitchen Valley Center Photos Menu
Wattengel Funeral Home Meadow Drive
ENDOCRINOLOGY-PSR in Lewes, DE for Beebe Healthcare
manhattan cars & trucks - by owner - craigslist
Avatar: The Way Of Water Showtimes Near Jasper 8 Theatres
Hawkview Retreat Pa Cost
Evil Dead Rise - Everything You Need To Know
Secondary Math 2 Module 3 Answers
Craigslist Charlestown Indiana
What Responsibilities Are Listed In Duties 2 3 And 4
Latest Posts
Article information

Author: Kieth Sipes

Last Updated:

Views: 6002

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Kieth Sipes

Birthday: 2001-04-14

Address: Suite 492 62479 Champlin Loop, South Catrice, MS 57271

Phone: +9663362133320

Job: District Sales Analyst

Hobby: Digital arts, Dance, Ghost hunting, Worldbuilding, Kayaking, Table tennis, 3D printing

Introduction: My name is Kieth Sipes, I am a zany, rich, courageous, powerful, faithful, jolly, excited person who loves writing and wants to share my knowledge and understanding with you.