type in your query to search makeyougohmm
Things that ... make you go hmmtechnology music video art news reviews and muse on the web

December 19, 2008

How to flush DNS cache in Windows from the command line

reference, How To — by TDavid @ 8:36 am PST

Ever want or need to see the most recent version of a website? Maybe the DNS has changed and now you are still seeing the old version location cached while all your friends are seeing the new version. How do you flush those stale DNS records from your system?

That’s the command to remember: flushdns

Setting up Adsense for Domains on a few of our domains this week and had the need to flush the DNS on my Windows machine so I could see the domain ads that were showing. Kept hitting the search engine to find sites to remind me of the proper shell commands to use. It’s not like it’s super complicated to remember, but I try not to memorize commands I rarely use. Almost have it memorized now though and to help along the process I decided to make it a blog post here as well. What should these type of blog posts be called? Self-reminders? Whatever, let’s get to the flushing.

Step by step instructions for flushing the DNS cache in Windows

STEP 1. Go to START in the lower left corner and type:

cmd

STEP 2. right click on the cmd.exe under the Programs bar and in Windows Vista choose "Run as Administrator"

windows-dns-flush

STEP 3. in the cmd.exe shell window type the following:

ipconfig /flushdns

windows-dns-flush2

STEP 4. Reload the website you want to see the most recent version DNS retrieved. Wash, rinse, repeat as necessary.

Did this post make you go hmm?

F = please no more posts like thisD = not among your best stuffC = average postB = good post, I liked itA = great post, please create more like this (3 votes, average: 4.67 out of 5)

Loading ... Loading ...

Maybe Related Posts (plugin generated)

RSS Feed comments for this post 2 Comments »

  1. Help me out with this… i have been looking for a way to do what i think is explained here for ages.
    When i change my link order for example i sometimes cannot actually view it and have to resort to using a different browser which is irritating.
    This looks like a solution but, I have an auto translator on my site with a caching module and WP-Supercache running so I need the pages to be cached for the translated versions so i dont keep querying the translation engine and eventually have my site blocked.
    Is this “DNS flush” only affecting what is stored on my local machine? If so then it the solution to a huge hinderance! but I wont do anything until I have a definite answer as I don’t want to delete any cached pages on my site.

    Comment by Andy in Tenerife — December 31, 2008 @ 7:12 pm PST

  2. Hi Andy,

    If I’m understanding you correctly flushing your DNS will not help you. All that flushing your DNS does is return the most recent DSN information for a website. You aren’t changing the content of what the server of a site the DNS points to already. A cache is usually purged for all visitors after a certain number of seconds, so no matter how many times you visit until that number of seconds has passed a new page will not be delivered.

    Short answer: no, this will not help. What would help is to reduce the number of seconds that you are caching pages or to purge the cache for a particular page that you want to receive. Check the admin area in WP-supercache and look for the number of seconds variable and lower and/or purge the cache for only the page you are concerned about when you want a new page. Just reduce that seconds for pages to be cached to say once every five minutes. Then you’ll receive a fresh page every 5 minutes.

    Caching programs are useful for heavy trafficked pages. This blog employs a cache and in some very heavily trafficked posts goes even futher than a cache by delivering a static page that only changes when a new one overwrites it. Caching is best to combat things like the slashdot effect, if you are familiar with that (if not: the slashdot effect is when a site/page gets linked by slashdot.org and a massive amount of visitors come to the site at one time possibly overloading your web server).

    Hope this explanation helps :)

    Comment by TDavid — December 31, 2008 @ 9:40 pm PST


TrackBack URI: http://www.makeyougohmm.com/20081219/5812/trackback/

Leave a comment


By leaving a comment you consent to the Official Hmm Comment Policy

Return Home

Copyright 2003-2008 KMR Enterprises All Rights Reserved. Privacy Policy