Flush DNS

From DreamHost
Revision as of 08:17, 12 August 2012 by Danheneise (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Flushing the DNS records on your computer is something that can prove quite useful when trying to speed up DNS Resolution for a newly added or modified domain in your account. While it's not an end-all solution to speeding up propagation, it will at least remove the local cache from your system and allow you to grab the most recent cache that your ISP has.

Steps to flush your DNS cache in Windows

Windows XP

  1. Click the 'Start' button and then click on 'Run'.
  2. Type in cmd and click 'OK'.
  3. In the window that comes up, enter in: ipconfig /flushdns
  4. Press the 'Enter' key and repeat the process two more times.
  5. Type exit and press the 'Enter' key to close the window.

Windows Vista

  1. Click the 'Start' button and then type 'cmd'. (Into the search box if not already selected)
  2. When you see "cmd" highlighted, hold down 'Ctrl' + 'Shift' and hit 'Enter'. Or, you can right click on it and select "Run as administrator".
  3. Select 'Continue' at the "User Account Control" screen.
  4. In the window that comes up, enter in: ipconfig /flushdns and hit enter.
  5. Press the 'Enter' key and repeat the process two more times.
  6. Type exit and press the 'Enter' key to close the window.

If you wish to instead verify what domains and IPs your computer currently has cached, you may use the command ipconfig /displaydns in the steps above.

Windows 7

  1. Click the 'Start' button and then type 'run' in the search bar (where it says 'search for program and files').
  2. Where it says Open: type in 'cmd'.
  3. In the window that comes up, enter in: ipconfig /flushdns
  4. Press the 'Enter' key and repeat the process two more times.
  5. Type exit and press the 'Enter' key to close the window.

Steps to flush your DNS cache in OS X

10.4 (Tiger)

  1. Open up a terminal window (Located in /Applications/Utilities).
  2. Flush your DNS cache with the following command: lookupd -flushcache
  3. Type logout and press the 'Enter' key to close the window.

10.5 (Leopard), 10.6 (Snow Leopard), 10.7 (Lion), and 10.8 (Mountain Lion)

  1. Open up a terminal window (Located in /Applications/Utilities).
  2. Flush your DNS cache with the following command: dscacheutil -flushcache
  3. Type logout and press the 'Enter' key to close the window.

Note: some Lion users report that dscacheutil does not work on 10.7 or 10.8. The alternative you could try running in the Terminal is:

 sudo killall -HUP mDNSResponder

(via HenryAZ on macrumors.com)

Steps to flush your DNS cache in Linux

  1. Open up a terminal window (Location varies by distribution).
  2. Flushing your DNS cache is done by restarting the 'nscd' daemon and may be done with the following command: /etc/rc.d/init.d/nscd restart
    1. Or you may manually stop and start the daemon with the following commands:
      1. /etc/rc.d/init.d/nscd stop
      2. /etc/rc.d/init.d/nscd start
  3. Type logout and press the 'Enter' key to close the window.
  4. On Ubuntu 11.04, I had to use these commands:
    1. sudo apt-get install nscd
    2. sudo service nscd restart

Notes

  1. When exiting the Windows command prompt, you may be given a pop-up box claiming that Windows can not end the program as it may still be running something. It's completely safe (and required) to click the 'End Now' button to exit.
  2. Make sure that you have closed any browser windows that you have open, as they'll still be reading from the previous cache that they loaded into memory. Restart the browser and attempt to view your site. Provided a reasonable amount of time (generally a couple of hours) has passed, you should be able to see your site online. If not, it's very likely that your ISP has not updated their DNS cache, and it's not possible to get around this without doing some hosts file modification.
  3. You may alternately use third-party DNS servers such as OpenDNS which even lets you manually ask them from their website to update their cache of any domain. You need to manually change your computer's configuration to use the third-party DNS servers for this to work, and it may not be possible or recommended in some business environments.
  4. The DreamHost support team is unable to assist in DNS propagation issues as it is generally out of our control. DNS changes may take up to 72 hours to complete. If you notice your site not working after that time, you may go ahead and contact support to make sure your DNS records are okay.