Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force DNS refresh for a website?

Tags:

caching

dns

I'm moving my web application to another server and in the next few days I'll refresh the DNS to point to the new IP location.

Unfortunately some browsers and SOs keep a DNS cache that will make users point to the old IP location. Some users are rookies and they'll not refresh the DNS cache manually and I know we'll lose a lot of them in the first weeks after this change.

Is there anyway to force this DNS cache to refresh so it'll be transparent for our final users?

like image 519
Adriano Castro Avatar asked Jan 13 '14 12:01

Adriano Castro


People also ask

Is there a way to force DNS update?

You use the ipconfig /registerdns command to manually force an update of the client name registration in DNS. The computer is turned on. A member server is promoted to a domain controller.

How do I force DNS cache to clear?

Open the Start Menu and start typing command prompt until you see it in the results. 2. Type ipconfig /flushdns when the prompt loads and hit Enter on the keyboard. The DNS Cache database on your computer is now clear.

How do I force DNS propagation?

There isn't really a method to force DNS propagation, but we can force our local PC to update it. Or even, we can simply change our local DNS servers. This way there is a big chance to force the new DNS to update.

How do I flush and renew my DNS?

Type ipconfig /renew in the command prompt and press the Enter/Return key on your keyboard. Wait a few seconds for a reply that the IP address has been re-established. Type ipconfig /flushdns in the command prompt and press the Enter/Return key on your keyboard.


1 Answers

As far as I know, a forced update like this is not directly possible. You might be able to reduce the DNS downtime by reducing the TTL (Time-To-Live) value of the entries before changing them, if your name server service provider allows that.

Here's a guide for less painful DNS changes.

A fair warning, though - not all name servers between your client and the authoritative (origin) name server will enforce your TTL, they might have their own caching time.

like image 69
positivew Avatar answered Sep 29 '22 16:09

positivew