If you are having trouble accessing a website, it could be because of a problem with your DNS cache. To reset your DNS cache on your Mac, you need to enter a command using the Terminal. In most cases, this will work, especially if you are using macOS Sierra, High Sierra, or Mojave. Earlier versions of OS X may need some additional commands as well.
For macOS Mojave, High Sierra or Sierra, all you should need is this one line: sudo killall -HUP mDNSResponder
For earlier versions of OS X, you may also need these lines: sudo killall mDNSResponderHelper
sudo dscacheutil -flushcache
Comments: 5 Responses to “How To Reset Your DNS Cache”
Linda Niebanck
6 years ago
I do have trouble accessing websites because a long string of letters/numbers/etc. just can't load. I can't follow your directions, however. Can you list them clearly for me? I did find (accidentally) Treminal. Then what?
Linda: I have the lines for you to copy and paste right below the video. But if your problem is with complicated URLs, this won't help. DNS only deals with domains, not the pages.
Judy Eastwood
6 years ago
I have this very problem right now with one website only. I have spoken with Apple Care, with the company whose website it is, and with my ISP. No luck with any of those. I just reset my DNS cache as you described and still no luck. Any other ideas?
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.
To proceed, enter your password, or type Ctrl-C to abort.
Password:
You didn't mention about this message.. should i proceed?
I do have trouble accessing websites because a long string of letters/numbers/etc. just can't load. I can't follow your directions, however. Can you list them clearly for me? I did find (accidentally) Treminal. Then what?
Linda Niebanck
Linda: I have the lines for you to copy and paste right below the video. But if your problem is with complicated URLs, this won't help. DNS only deals with domains, not the pages.
I have this very problem right now with one website only. I have spoken with Apple Care, with the company whose website it is, and with my ISP. No luck with any of those. I just reset my DNS cache as you described and still no luck. Any other ideas?
Judy: Maybe your ISP is blocking them? Have you tried a different browser? Different device?
I am running El Capitan,, and got this response?
Narelles-iMac-2015:~ nar311$ sudo killall -HUP mDNSResponder
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.
To proceed, enter your password, or type Ctrl-C to abort.
Password:
You didn't mention about this message.. should i proceed?