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
How Long Does it Take to Get a Student Loan | Edvisors
Identity Theft Protection - ID Theft Assistance | Equifax®
English Bulldog Puppies For Sale Under 1000 In Florida
Www.1Tamilmv.cafe
Jackerman Mothers Warmth Part 3
Login Page
9192464227
Apex Rank Leaderboard
When is streaming illegal? What you need to know about pirated content
Mndot Road Closures
2024 Non-Homestead Millage - Clarkston Community Schools
Ts Lillydoll
iOS 18 Hadir, Tapi Mana Fitur AI Apple?
Craigslist Panama City Fl
Bank Of America Financial Center Irvington Photos
50 Shades Of Grey Movie 123Movies
Exterior insulation details for a laminated timber gothic arch cabin - GreenBuildingAdvisor
Yard Goats Score
Timeforce Choctaw
Dallas Mavericks 110-120 Golden State Warriors: Thompson leads Warriors to Finals, summary score, stats, highlights | Game 5 Western Conference Finals
Purdue 247 Football
Shreveport City Warrants Lookup
Play It Again Sports Norman Photos
Harrison County Wv Arrests This Week
The Collective - Upscale Downtown Milwaukee Hair Salon
Netspend Ssi Deposit Dates For 2022 November
Criglist Miami
3 Ways to Format a Computer - wikiHow
King Soopers Cashiers Check
Brenda Song Wikifeet
Wow Quest Encroaching Heat
Craigslist Albany Ny Garage Sales
Chris Provost Daughter Addie
Google Jobs Denver
Frank 26 Forum
Koninklijk Theater Tuschinski
The Holdovers Showtimes Near Regal Huebner Oaks
Craigslist Mexicali Cars And Trucks - By Owner
How Many Dogs Can You Have in Idaho | GetJerry.com
Ferguson Showroom West Chester Pa
Mississippi weather man flees studio during tornado - video
2013 Honda Odyssey Serpentine Belt Diagram
Po Box 101584 Nashville Tn
Crystal Glassware Ebay
Best Suv In 2010
Port Huron Newspaper
Killer Intelligence Center Download
Www.homedepot .Com
Dietary Extras Given Crossword Clue
Sml Wikia
Edict Of Force Poe
Craigs List Sarasota
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.