You are moving a site to a new server. What do you do with DNS to make the cutover smooth?
BeginnerScenarioDNS & Service Discovery
Answer
Situation read → DNS caching makes cutovers slow unless you prepare.
What I'd do →
- Lower the TTL (for example from 86400 to 60 seconds) at least one old-TTL period before the change
- Bring the new server up and test it with
curl --resolve www.example.com:443:203.0.113.20 https://www.example.com - Change the record
- Watch both servers' logs until traffic drains from the old one, then raise the TTL again
Why → Resolvers honor the TTL they cached, so you must wait out the old value before the low TTL takes effect.
Interview tip → Mention that some ISPs and apps ignore low TTLs, so keep the old server alive for a while.
More on DNS & Service Discovery
A customer types www.example.com in a browser. Walk through how DNS resolves it.BeginnerWhat is the difference between an A record and a CNAME, and when do you use each?BeginnerWhy can't you put a CNAME at the zone apex, and what do you use instead?BeginnerHow do you find which nameservers are authoritative for a domain and query them directly?BeginnerWhat DNS records do you set up for company email?BeginnerWhen do you use /etc/hosts and when DNS?Beginner