Moving a website without losing its DNS records
A website move involves more than changing an address record. Prepare the new server, record the existing zone and decide how submissions will be handled while visitors can still reach either host. DNS caches make a completely simultaneous change impractical.
Record the current service
Save the zone contents and identify the authoritative name servers. Record the address for the bare domain and www, any aliases, mail exchangers and the addresses those exchangers depend on. Confirm who can change the zone. Moving the website does not necessarily require moving the name servers or mail service at the same time.
Lower the relevant TTL in advance
A resolver that already cached a record may retain it for its original time to live. Lower the TTL at least one old TTL before the intended change, then check that every authoritative server is serving the revision. When editing a primary zone file, increment its SOA serial so secondary servers can recognise the update.
Test the destination under the real hostname
Use a temporary hosts-file entry on a test workstation to send the existing hostname to the new server. Check virtual hosting, absolute links, form recipients, permissions and any scheduled jobs. An address-only test may hit the default website instead. Remove the local override afterwards so later tests use public DNS.
Control writes during the change
For a brochure site, synchronise files immediately before changing the address. For a database-backed site, arrange a maintenance period or a single place to accept new writes. Two independent order databases will diverge while cached DNS points visitors at different servers. Keep a record of the final copy and the point at which the new service accepted submissions.
Verify before retiring the old host
Query the authoritative servers directly, then check through more than one recursive resolver. Watch both web logs and confirm delivery of test enquiries. A previously missing name can remain negatively cached, so creating it does not make it instantly visible everywhere. Keep the old host available through the expected cache lifetime and investigate residual traffic before cancelling it.
Retain the old zone and server configuration. Reverting an address is another cached change; agree what happens to submissions already accepted on the new system before attempting it.