0

Say my domain example.com has TTL set to 86400. If i change this through the registrars' panel to 60 when will this change take place? Will it need 86400 seconds ? or will it be instant?

I cant find anything online regarding this.

kasperd
  • 29,894
  • 16
  • 72
  • 122
Lithium
  • 11
  • 2
  • You TTL settings are not mandatory for other DNS servers along the route. In fact sometimes you can reach your site from a connection of ISP A but ISP B can take 10 more hours. – Broco Jan 10 '17 at 12:58
  • 1
    For migrating a website, it can take months before your old server is no longer used. It was a recommendation below, but I would strongly advise y to set up a proxy on your current web server to your new one, along with having that temporary short TTL. – Halfgaar Jan 10 '17 at 13:39
  • @Broco It is mandatory, but there are servers which violate the standards. – kasperd Jan 10 '17 at 20:18
  • We also had some discussion around this in the following Q&A: [What happens when your TTL gets screwed up in your DNS record?](http://serverfault.com/q/630043/152073) – Andrew B Jan 11 '17 at 15:17

2 Answers2

3

it can take up to that 86400 but not all recursive dns servers strictly follow ttl values, especially for 60 (expect ttl no lower than 300 real world).

rule of thumb is 48 hours, actual results will greatly vary.

a nice tool to check common public dns resolvers... https://www.whatsmydns.net

Jacob Evans
  • 7,636
  • 3
  • 25
  • 55
  • 1
    Hi, thanks for the answer. We are preparing to migrate to a new server so we need to lower the TTL to be safer. So if we lower today the TTL from 86400 to 300. It will be safe to make the IP change after 24hours. – Lithium Jan 10 '17 at 13:00
  • yes that's a really good idea – Jacob Evans Jan 10 '17 at 13:01
  • 2
    you could proxy one to the other with nginx or apache also – Jacob Evans Jan 10 '17 at 13:04
  • @Lithium Keep in mind that your TTL settings aren't mandatory for other DNS servers on the route, you cannot **force** them to update their caches. Some have a fixed 24h setting that completely ignores TTL settings of cached servers. So your approach is the best you can do but still keep in mind there might be a downtime, best practice if you want to avoid **any** downtime would be to set up a small machine that redirects to the new location. – Broco Jan 10 '17 at 13:09
  • Thanks for clarifying this @Broco. I will check out this possibility. – Lithium Jan 10 '17 at 13:12
  • 2
    In case anybody thinks that proxying from the old IP to the new is too much work and isn't worth the effort, I would at least set up an ssh port forwarding. But of course an actual http proxy is a more reliable solution than the ssh port forwarding. – kasperd Jan 10 '17 at 20:30
2

For caching DNS servers that cached your domain information immediately before the change is applied it could take up to 86400 seconds for the change to be seen. For DNS server that have never cached your records or have not refreshed their cache since it was last flushed then the change will be seen immediately. DNS servers that have previously cached your information will be somewhere in between 0 and 86400.

user9517
  • 114,104
  • 20
  • 206
  • 289
  • That's right in theory but in practice TTL options aren't mandatory. A third party DNS server doesn't have to apply to the settings you specify on your DNS. In fact, many DNS servers cache for 24 hours no matter what TTL you specified in order to reduce traffic. – Broco Jan 10 '17 at 13:00