Difference between revisions of "Flush DNS Resolver Cache"
(→Mac OS X) |
Mason.harper (Talk | contribs) m (→Mac OS X: OSX 10.10.4 and greater has a different command to flush DNS) |
||
(One intermediate revision by one other user not shown) | |||
Line 25: | Line 25: | ||
# Then, open the Terminal application and enter the command listed below based upon the OS X version. | # Then, open the Terminal application and enter the command listed below based upon the OS X version. | ||
+ | |||
+ | OSX 10.10.4 and greater (Yosemite) | ||
+ | <pre>sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder; say cache flushed</pre> | ||
OSX 10.10 (Yosemite) | OSX 10.10 (Yosemite) | ||
− | <pre> sudo discoveryutil udnsflushcaches </pre> | + | <pre>sudo discoveryutil udnsflushcaches</pre> |
OSX 10.9 (Mavericks) | OSX 10.9 (Mavericks) | ||
− | <pre> dscacheutil -flushcache; sudo killall -HUP mDNSResponder </pre> | + | <pre>dscacheutil -flushcache; sudo killall -HUP mDNSResponder</pre> |
OSX 10.7 – 10.8 (Lion and Mountain Lion) | OSX 10.7 – 10.8 (Lion and Mountain Lion) | ||
− | <pre> sudo killall -HUP mDNSResponder </pre> | + | <pre>sudo killall -HUP mDNSResponder</pre> |
OSX 10.5 – 10.6 (Leopard and Snow Leopard) | OSX 10.5 – 10.6 (Leopard and Snow Leopard) | ||
− | <pre> sudo dscacheutil -flushcache </pre> | + | <pre>sudo dscacheutil -flushcache</pre> |
=== Linux === | === Linux === |
Latest revision as of 14:11, 31 January 2017
How to Flush Your DNS Resolver Cache
Sometimes you may need to flush your computer's DNS Resolver Cache. The DNS Resolver Cache within your operating system stores the location of Web sites you visit on the Internet. This is intended to improve browsing speed, but sometimes it needs to be cleared to ensure good performance (for example, if you recently moved your site to a new server). Instructions for flushing the DNS Resolver Cache on several operating systems are below.
Windows
- Open a command prompt.
- One way to do this is to open the Start Menu, click Run, type cmd, and press enter
- In Windows 7 you can just open Start and type cmd and press enter
- If your account is not an Administrator, you'll need to run the command prompt as Administrator.
- One way to do this is to open the Start Menu, click Run, type cmd, and press enter
In the command prompt type the following and press enter:
ipconfig /flushdns
Mac OS X
The command to clear the DNS cache is different depending upon which version of OS X is installed on your Mac.
To determine this version:
- Click the Apple icon at the top left of the screen
- Click "About This Mac" (topmost option)
- Then, open the Terminal application and enter the command listed below based upon the OS X version.
OSX 10.10.4 and greater (Yosemite)
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder; say cache flushed
OSX 10.10 (Yosemite)
sudo discoveryutil udnsflushcaches
OSX 10.9 (Mavericks)
dscacheutil -flushcache; sudo killall -HUP mDNSResponder
OSX 10.7 – 10.8 (Lion and Mountain Lion)
sudo killall -HUP mDNSResponder
OSX 10.5 – 10.6 (Leopard and Snow Leopard)
sudo dscacheutil -flushcache
Linux
From the terminal, enter the following command at the prompt:
/etc/rc.d/init.d/nscd restart