Around 24 hours ago I set a new IP address for the A record on my website and it appears to be working well by pointing visitors to that new IP address. But, sometimes it still points users to the old IP address which is now set up as a restricted access test environment. How can I go about ensuring that only the new DNS A record are sent to clients? How can I refresh/flush the DNS on the server?
EDIT: Can one lower the timeout BEFORE the IP change so that they flush the old one sooner? How?
Looking at the SOA record for the domain:
The default TTL says that anyone can cache the result for up to 1 day. Besides the refresh says that a slave server should get new data from the master every three hours, so you have to wait at least 24 + 3 = 27 hours before you can trust everyone to have the new information.
The best way to handle this kind of DNS changes is to prepare at least 24 hours (or whatever TTL you have) ahead by temporarily setting down the TTL (maybe to 600, which is 10 minutes). Then you can do the changes and they take effect within 10 minutes. When you see that everything works and you don’t need the possibility for a quick rollback, you can reset the TTL to 86400 again.