If you've recently updated a domain's DNS or migrated a website but are still seeing old records, it's essential to clear your local system's DNS cache. Your DNS resolvers may have cached the outdated domain name to IP mapping, causing your browser to pull up old IP addresses instead of the new ones.
Prerequisites
- Access to your computer and the necessary permissions to run commands.
- Familiarity with using the command line or terminal for your operating system.
How to Clear Your Browser's DNS Cache
For Chrome:
- Select the three dots in the top left corner and choose "Settings".
- Scroll to the bottom and select "Advanced".
- Under "Privacy and security", click "Clear browsing data".
- Choose the items you want to clear and click "Clear".
For Brave:
- Click the three horizontal lines in the upper right corner and go to "Settings".
- Expand "Additional Settings" on the left side.
- Click on "Privacy and Security".
- Open "Clear Browsing Data" and select "All time" for the time range.
- Uncheck "Browsing History" and "Cookies and other site data" if you want to keep them.
- Click "Clear data".
For Opera:
- Select "Opera" from the top left, then click "Clear Browsing Data".
- Check the boxes for the data you want to clear and click "Clear Browsing Data".
For Safari:
- Select "Safari" in the top left corner and then "Clear History".
- Choose the timeframe for clearing and click "Clear History".
For Firefox:
- Click the three horizontal lines in the top right corner and select "Preferences".
- Go to "Privacy & Security".
- Click "Clear History".
- Select the data you want to clear and how far back to go, then click "Clear Now".
For Internet Explorer:
- Select the gear icon in the top right corner and click "Internet Options".
- In the Browsing History section, click "Delete".
- Choose what you'd like to delete and click "Delete".
How to Clear Your Local System's DNS Cache
For macOS:
Open the Terminal (Applications > Utilities > Terminal) or use the Spotlight search.
For macOS Big Sur, Catalina, Mojave, High Sierra/Sierra & El Capitan:
sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper; sudo dscacheutil -flushcache; say DNS cache flushed
or
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder; say DNS cache flushed
Enter your password (it won’t appear on the screen) and press Enter. Type exit
to close the Terminal.
For macOS Yosemite:
sudo discoveryutil udnsflushcaches; sudo dscacheutil -flushcache
For older versions, you may try:
sudo lookupd -flushcache
For Linux:
Open a root terminal window (Ctrl+T in Gnome) and type one of the following commands:
/etc/init.d/nscd restart
or
sudo /etc/init.d/nscd restart
Some distributions support:
sudo /etc/init.d/dns-clean start
or
sudo service nscd restart
Restart your application (e.g., browser or email) afterward.
For Windows 10:
- Search for "Command Prompt" in Windows search.
- Right-click and select "Run as Administrator".
- In CMD, type
ipconfig /flushdns
and press Enter.
For Windows 8/8.1:
- Search for "Command Prompt" and select "Run as Administrator".
- In CMD, type
ipconfig /flushdns
and press Enter.
For Windows Vista and Windows 7:
- Close your application (e.g., browser or email).
- Click the Start button, go to All Programs > Accessories, and find Command Prompt. Right-click and choose "Run as Administrator".
- In CMD, type
ipconfig /flushdns
and hit Enter.
For Windows XP:
- Close your application (e.g., browser or email).
- Go to the Start menu, choose Run, type
cmd
, and hit OK. - In CMD, type
ipconfig /flushdns
and hit Enter.
Alternatively, use your browser's Private Mode (Firefox) or Incognito Mode (Chrome) to visit the website.
Clearing your browser and local system DNS cache is essential for accessing updated domain records. Follow the steps above based on your browser and operating system to ensure you're viewing the latest information.