clearing your dns cache

Posted by davidejones

Caching is a very common technique and is used all over the place from your ISP caching dns requests to your browser caching website files down to your own computer configuration. Its something that silently runs in the background speeding the use of technology for us and is something that we rarely notice.

Not very often but every once in a while I notice that a website we change the dns on will work for my colleagues on the same network but will not work for me. This isn’t their browser caching anything as i’ve asked them to try a different browser and clear their temporary files cache. We are all on the same network and have the same dns settings and use the same ISP so what could it be?

Well when this happens i usually resort to clearing the individual computers dns cache. I have a little batch file on my desktop for just such an occasion. Its infact become a habbit for me to run this file clear my browsers cache and then to test a site just to be sure.

@echo off
echo Preparing to flush the dns...
ipconfig /flushdns
net stop dnscache
net start dnscache
PAUSE

Trackback URL for this post: http://davidejones.com/blog/273-clearing-dns-cache/trackback/

Being Sociable...

  • If you like this article then please share it on your favourite social network and follow me on twitter for the latest updates

2 Responses to clearing your dns cache

Andrew

I’m wondering if you know how to write a batch or script file, to flush the dnscache, that will be triggered on certian conditions and/or run under as a task, via Windows Task Schedular?

davidejones

Hey i’m sorry but i haven’t had much experience doing those things so i don’t think i can really help there. I’m sure you can find the resources online and use my snippet above with it.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>