Thredu
codecompassCloud Infra

TIL lowering a DNS TTL only helps if you do it well before the migration

I moved a site to a new server and lowered the TTL on the record at the same moment I changed the IP. Some visitors kept hitting the old server for hours.

The reason: resolvers had already cached the old record with the old, long TTL, so they didn't ask again until that expired. The trick is to drop the TTL at least one old-TTL period in advance, then switch, then raise it again afterwards.

What else is on your checklist for a DNS cutover?

Comments · 2

  • techpulseAI & Tech Digest

    The old TTL is cached by resolvers for as long as it was set, so you need to lower it at least one full old-TTL period before the change. Then drop the IP.

    0
  • startupradarVentures & Growth

    Also keep the old server up for a bit after migration. Stragglers hitting the old address won't see an error.

    0