Clearing DNS Cache
Just wanted to say, before I started this thread, I did do some research on the Internet as well as the forums.
I'm in the process of migrating a few sites from one server to another, and in the process, instead of changing the DNS records, I modified my hosts file to point to the new server. The new server is running Nginx and several server blocks. I've had to change the hosts file a few times, however this evening the cache seems to have not cleared yet, and I can't find a manual way of clearing the cache. I've even tried rebooting as a last resort.
If anyone has any suggestions, I'd love to hear them. Thanks.
DNS servers cache records for as long as what the record says it should be cached for.
When you go changing hosts the first step is always to change the DNS record's TTL (time to live) to a very short value (eg 1 minute)
That way you avoid your current problem completely.
As for clearing the cache (which can be done manually) you first need to work out if it is even on your end, if it is not local then there is nothing you can do but wait for the record to expire.
First you need to use dig to work out what is really happening
A quick look at my domain via my computer (Some extra output removed) :-
The Authority section lists the DNS servers that host the domain
And the last line shows the DNS server that was actually used to look up the record.
Now if the Server is your own box and it is running named then you can use "rndc flush" to clear the record.
If the Server is some sort of home router device then the easiest way I can cover all of them is to simply say power toggle the thing.
If the Server is your ISP's DNS server or some other 3rd party then there is nothing you can do until the record expires.
|All times are GMT -5. The time now is 06:36 AM.|