You are not logged in.
Pages: 1
How can I clear the DNS cache?
When I configure my webserver and change the records, I have to wait the time configured in the ttl of the specific record. I know, that I can change the ttl to a lower value, but the default value is 3 hours, so i have to wait until the time's up.
I checked the DNS records with dig (from dnsutils). dig also shows the remaining seconds until the next refresh (dns server request). And here's my question: How can I refresh it manually? (tried a lot from the internet, but nothing helped)
Thank you guys!
Last edited by gummiflummi (2014-12-16 20:41:53)
Offline
I don't think that provider of public resolving name servers let you flush their cache. So there is nothing you can do, unless you run your own caching resolving nameserver.
As a temporary workaround you can put the new IP address for the hostname in /etc/hosts until your updated DNS records have found their way onto the public resolver you use.
By the way: Sadly, some ISPs don't care for TTLs and let their recursive name servers cache records much longer for whatever reasons.
Offline
I don't think that provider of public resolving name servers let you flush their cache. So there is nothing you can do, unless you run your own caching resolving nameserver.
Some providers allow a forced refresh, for example opendns. There are also routers with an integrated nameserver which has to be flushed.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
change the records
Woah right there. Why do you need to *change* the records? Shouldn't happen often.
When you know that a change is required soon, what you should do is change the TTL to a lower value than usual, so then *after* you change it, the TTL will expire sooner.
Offline
Thank you all! You're right and the tips helped me. @brebs: I wanted to try diffrent configs and had to wait all the time. That was a bit annoying, but now everything's working fine. Should I increase the TTL back to the old value?
Offline
Woah right there. Why do you need to *change* the records? Shouldn't happen often.
Other than the answer stated (to test DNS settings), you might want to change records for a (self-hosted) DynDNS service. If you want a device to updated its DNS entries while being connected to a shaky cellular network, those changes might occur frequently with changing IPs.
To the original poster: You should always set the TTL to a reasonable setting. If you didn't change the record for the last two years, then maybe a TTL of several hours (or even a day) might be OK. If you want to be able to react more quickly to emergency situations, set it lower. For a DynDNS service, TTLs below a minute might be appropriate.
If you want to test your DNS Server, you can always query it directly (bypassing your ISP's DNS servers) with a command like this (where 1.2.3.4 is the IP of your nameserver):
dig @1.2.3.4 your.entry.example.com
This will usually show you the new settings right after changing.
Offline
Pages: 1