Clear DNS Cache in Your Windows 10/8/7 or Mac OS EASILY!

If your computer is experiencing any of the following:

  • Internet connection issues (Internet keeps disconnecting/dropping out, connection timed out error504 gateway timeout error, page slow or not loading);
  • DNS issues (like DNS Server is not responding)

etc, chances are you might have to flush your DNS cache to get everything back on track again. Jump here to clear your DNS cache.

What I might want to know about DNS

DNS (Domain Name System) cache is a temporary database that keeps tracks of a specific website’s DNS information upon a user’s first visit so that the information can be conveniently reused for future reference. But sometimes the DNS information of the website might have changed, hence different kinds of Internet connection and corrupted DNS issues.

So we might have to erase the DNS cache to remove any invalid records so that our computer can find the latest DNS information for the website.

Clear your DNS cache

I’m using Windows 10, 8 or 7:

I’m using Mac OS:


I’m using Windows 10, 8 or 7:

Note: The screenshots below are from Windows 10, but the steps also work in Windows 8 & 7.

1) On your keyboard, press the Windows logo key  and type cmd. Then right click on Command Prompt and click Run as administrator.

Click Yes when prompted to confirm.

2) Copy & paste ipconfig /flushdns into the window and press Enter.

You’ll receive the message Successfully flushed the DNS Resolver Cache indicating a successful DNS flush.

I’m using Mac OS

1) Open Terminal on your Mac PC.

2) Choose your Mac OS from the table below, then copy & paste the corresponding command lines into the Terminal window and press Enter after each:

Choose your Mac OS

Command Lines (minus the semicolon;)

 High Sierra (10.13) and latermacbook$ sudo killall -HUP mDNSResponder;
sudo killall mDNSResponderHelper;
sudo dscacheutil -flushcache
El Capitan(10.11),  Sierra(10.12)macbook$ sudo killall -HUP mDNSResponder
Yosemite (10.10)


10.10.4 +macbook$ sudo dscacheutil -flushcache;
sudo killall -HUP mDNSResponder
10.10.1, 10.10.2, 10.10.3


macbook$ sudo discoveryutil udnsflushcaches

3) Now congrats! Your DNS cache has been erased.


That’s it – everything you need to know about DNS and how to flush your DNS cache on your Windows 10/8/7 & Mac OS. Hope this helps and feel free to share your questions or ideas with us in the comment section below. 🙂

By Enya Zhang

Enya is a writer at who spends most of her working hours scouring the web to find the best bargains and deals for her readers - a job that combines her two great loves: writing and shopping.She's an introextrovert who loves being out and about, hanging out with friends and exploring new things, but also enjoys staying home and unleashing her inner nerd - reading, getting hands-on with the latest tech, and binge watching clever TV shows and movies.

Failed to load the Search bar. Please refresh the page and try again.
Click here to reload