Flushing your local DNS cache is helpful if your computer is having trouble reaching a certain website or server as well as during the testing phase of your migration. This action allows faster requests to a website and retrieve recently changed DNS records.
The commands to complete the process are specific to the Operating System, please select your OS from the menu on the right to view the steps:
Linux
Note: |
Many current Linux distributions do not utilize local DNS resolver cache like Windows and Mac OS X. Please see the website for your Linux distribution and look for information regarding default included software to find out if your Linux installation uses local DNS caching. |
One of the most commonly used DNS caching Linux applications is Name Service Caching Daemon (NSCD). If you have NSCD installed, you can clear the local DNS cache by running one of the following commands in your terminal/shell applicaiton.
- To clear local DNS Cache for current user:
nscd -i hosts
- To clear local DNS cache for all users:
nscd -I hosts
- Some Ubuntu and Debian-derived distributions can flush the cache with the command:
sudo service dns-clean restart
Mac OS X
Click on your Applications icon, then search for Terminal. Click on the Terminal to launch the CLI.
- Mac OS X version 12
sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache
- Mac OS X version 11
sudo killall -HUP mDNSResponder
- Mac OS X version 10.10.4 and newer:
dscacheutil -flushcache; sudo killall -HIP mDNSResponder
- Mac OS X version 10.10+-10.10.3:
sudo discoveryutil mdnsflushcache; sudo discoveryutil udnsflushcaches
- Mac OS X version 10.9:
sudo killall -HUP mDNSResponder
- Mac OS X versions 10.6-10.8:
sudo dscacheutil -flushcache
Windows
- Open an elevated command prompt:
- In Windows 8 and higher, use the keyboard shortcut Windows key + x to access the Power Users menu, then select Command Prompt(Admin).
- In previous Windows versions:
- Type "command" into the search field at the bottom of the Start Menu.
- Right-click on the cmd.exe icon.
- Select Run as Administrator.
- Enter the following command and press the Enter key on your keyboard:
ipconfig /flushdns
- If all goes well, you will recieve a confirmation message:
Successfully flushed the DNS Resolver Cache.
Comments
0 comments
Please sign in to leave a comment.