How to Flush DNS Cache on a Mac (2024)

> Apple

28

28 people found this article helpful

Open Terminal and then enter the correct flush DNS command for your Mac

By

Jeremy Laukkonen

How to Flush DNS Cache on a Mac (1)

Jeremy Laukkonen

Writer

  • Shoreline Community College

Jeremy Laukkonen is automotive and tech writer for numerous major trade publications. When not researching and testing computers, game consoles or smartphones, he stays up-to-date on the myriad complex systems that power battery electric vehicles .

lifewire's editorial guidelines

Updated on June 12, 2024

Reviewed by

Ryan Perian

How to Flush DNS Cache on a Mac (2)

Reviewed byRyan Perian

  • Western Governors University

Ryan Perian is a certified IT specialist who holds numerous IT certifications and has 12+ years' experience working in the IT industry support and management positions.

lifewire's editorial guidelines

In This Article

View All

In This Article

  • Step-by-Step: Flush DNS
  • Why Clear the DNS Cache?
  • Frequently Asked Questions

What to Know

  • You can delete the DNS cache through Terminal. Press Command+Space to search for it.
  • Enter this flush DNS command: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  • El Capitan and older Mac OS X systems use different commands to clear DNS.

This article explains how to delete the DNS cache on a Mac.

How to Use the macOS Flush DNS Command

If you’re experiencing internet connectivity issues, you may be able to fix them by resetting the DNS cache with a Terminal command. It should only take a few moments.

  1. Open Terminal. One quick way is to press Command+Space to launch Spotlight. Then, type Terminal and select it from the results.

    You can also access Terminal by navigating to Go > Utilities > Terminal.

  2. Type (or copy and paste) this command into Terminal and then press Enter:

     sudodscacheutil-flushcache;sudokillall-HUPmDNSResponder

    How to Flush DNS Cache on a Mac (4)

    This command only works in macOS 10.12 Sierra and newer. If you have an older version, check the next section for the correct command.

  3. Type your password and then press return. The DNS cache will be reset immediately, but there will be no message to that effect. When a new line appears, it indicates the command has been carried out.

    How to Flush DNS Cache on a Mac (5)

    The password will not appear in Terminal as you type it.

How to Flush DNS on Mac OS X

The Mac OS X flush DNS command is different than the one used in modern versions of the operating system. Open Terminal and then enter the command that corresponds with your version:

  • El Capitan: sudo killall -HUP mDNSResponder
  • Yosemite: sudo discoveryutil udnsflushcaches
  • Lion, Mountain Lion, and Mavericks: sudo killall -HUP mDNSResponder
  • Snow Leopard: sudo dscacheutil -flushcache
  • Leopard: sudo lookupd -flushcache
  • Tiger: lookupd -flushcache

What Does Flushing DNS Do?

Each time you access a website in your web browser, the URL you enter is sent to a DNS server for translation into an IP address. This information is stored in a cache on your Mac for easy retrieval in the future, hence the term DNS cache.

When you try to access a website you’ve been to recently, your Mac uses its DNS cache instead of checking with an actual DNS server. The web browser doesn’t have to go through the extra step of communicating with a remote DNS server, which results in less time between entering a website address and the website loading.

If the local DNS cache is corrupt or outdated, it’s kind of like trying to use an old phone book that's been vandalized. Your web browser checks the cache to find an IP address for the website you’re trying to visit, and it finds either the wrong address or an unusable one. This can slow the process down or prevent websites or specific web page elements, like videos, from loading.

When you flush your DNS cache, you instruct your Mac to delete its local DNS records. This in turn forces your web browser to check with a DNS server for fresh information. You should always flush your DNS cache after changing the DNS servers on your Mac. It can also be helpful if you’re having connectivity problems.

FAQ

  • How do I check the DNS cache on a 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?

    To clear the DNS cache on Windows 10, open the Run dialog box, type in ipconfig /flushdns, and click OK. You can also use the same command in the Windows command prompt if you want more information on the process.

  • What is DNS cache poisoning?

    DNS cache poisoning, also known as DNS spoofing, is when someone deliberately enters false or incorrect information into a DNS cache. After the false information is input, future DNS queries will return incorrect responses and direct users to the wrong websites.

Was this page helpful?

Thanks for letting us know!

Get the Latest Tech News Delivered Every Day

Subscribe

Tell us why!

How to Flush DNS Cache on a Mac (2024)
Top Articles
Usain Bolt
Mortgages in Mexico - Far Homes
Terrorist Usually Avoid Tourist Locations
Body Rubs Austin Texas
Activities and Experiments to Explore Photosynthesis in the Classroom - Project Learning Tree
Is Sportsurge Safe and Legal in 2024? Any Alternatives?
Big Y Digital Coupon App
Lesson 1 Homework 5.5 Answer Key
Garrick Joker'' Hastings Sentenced
Bros Movie Wiki
What Time Chase Close Saturday
Fear And Hunger 2 Irrational Obelisk
Jackson Stevens Global
Money blog: Domino's withdraws popular dips; 'we got our dream £30k kitchen for £1,000'
Conan Exiles Colored Crystal
Truck Trader Pennsylvania
Cinebarre Drink Menu
Mani Pedi Walk Ins Near Me
Abortion Bans Have Delayed Emergency Medical Care. In Georgia, Experts Say This Mother’s Death Was Preventable.
Missed Connections Dayton Ohio
Costco Great Oaks Gas Price
Kamzz Llc
Isaidup
Glover Park Community Garden
Naval Academy Baseball Roster
Craigslist Illinois Springfield
Drift Hunters - Play Unblocked Game Online
Обзор Joxi: Что это такое? Отзывы, аналоги, сайт и инструкции | APS
Fiona Shaw on Ireland: ‘It is one of the most successful countries in the world. It wasn’t when I left it’
Page 2383 – Christianity Today
4Oxfun
Motorcycle Blue Book Value Honda
Kelley Fliehler Wikipedia
Kips Sunshine Kwik Lube
To Give A Guarantee Promise Figgerits
California Craigslist Cars For Sale By Owner
US-amerikanisches Fernsehen 2023 in Deutschland schauen
Unveiling Gali_gool Leaks: Discoveries And Insights
Exam With A Social Studies Section Crossword
'The Night Agent' Star Luciane Buchanan's Dating Life Is a Mystery
4k Movie, Streaming, Blu-Ray Disc, and Home Theater Product Reviews & News
R/Gnv
2294141287
Theater X Orange Heights Florida
Stephen Dilbeck, The First Hicks Baby: 5 Fast Facts You Need to Know
Automatic Vehicle Accident Detection and Messageing System – IJERT
Ihop Deliver
Gear Bicycle Sales Butler Pa
Autozone Battery Hold Down
Renfield Showtimes Near Regal The Loop & Rpx
Gelato 47 Allbud
Escape From Tarkov Supply Plans Therapist Quest Guide
Latest Posts
Article information

Author: Stevie Stamm

Last Updated:

Views: 6024

Rating: 5 / 5 (60 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Stevie Stamm

Birthday: 1996-06-22

Address: Apt. 419 4200 Sipes Estate, East Delmerview, WY 05617

Phone: +342332224300

Job: Future Advertising Analyst

Hobby: Leather crafting, Puzzles, Leather crafting, scrapbook, Urban exploration, Cabaret, Skateboarding

Introduction: My name is Stevie Stamm, I am a colorful, sparkling, splendid, vast, open, hilarious, tender person who loves writing and wants to share my knowledge and understanding with you.