Account for DNS TTL During a Game Server Move
Plan the change to a game server's DNS address around the TTLs that resolvers have already cached. Lower affected values ahead of the maintenance window, update the authoritative records, and verify the new answers without assuming an immediate change.
When a game server's IP address changes, some players may still receive the old address from a DNS cache. TTL describes the maximum cache time of a resource record in seconds. A lower TTL value does not delete answers that have already been stored; resolvers may return the old value until the previously received TTL expires. (RFC 1035, RFC 2181, Amazon Route 53: Changes do not take effect immediately)
This procedure covers the A and AAAA records of an existing DNS zone. It does not copy worlds, plugins, or configurations and does not describe a change of authoritative nameservers. Plan the data transfer separately; the Minecraft host migration guide covers that part. If your game also uses an SRV record, check its target and port as well; the SRV guide explains the exact mapping for Minecraft Java.
Record the old state before the maintenance window
Note which DNS zone is authoritative for the game name and where you edit its records. For this name, record at least the A value, any existing AAAA value, and the TTL of each affected record. For Minecraft Java, also include the _minecraft._tcp SRV record, target host, and port. If the SRV target points to the server being moved, also record its A or AAAA address and TTL in the zone that is authoritative for that target name. Records in a zone that is not authoritative for the respective name do not change the answers players receive.
You can use dig to display the response from your currently configured DNS resolver, including its TTL. The second column in the response is the TTL in seconds that this resolver is still returning. A cached query result is not necessarily the unchanged TTL value shown in your provider's interface. (BIND 9: dig)
dig +noall +answer play.example.com A
dig +noall +answer play.example.com AAAA
dig +noall +answer _minecraft._tcp.play.example.com SRV
An example response with reserved documentation values:
play.example.com. 3600 IN A 192.0.2.40
play.example.com. 3600 IN AAAA 2001:db8::40
_minecraft._tcp.play.example.com. 3600 IN SRV 0 0 25570 node.example.net.
example.com and example.net, as well as the address ranges 192.0.2.0/24 and 2001:db8::/32, are reserved for documentation. Replace them with your own name for queries. (IANA: Special-Use Domain Names, IANA: Example Domains, IANA: IPv4 Address Space, IANA: IPv6 Special-Purpose Address Space)
Lower the TTL before changing the address
If the provider allows it, lower the TTL of the affected records before the planned transition window. Check all responsible authoritative nameservers to confirm that the lower value has been published; only then does the waiting period begin. Example: if the old TTL is 3600 seconds and you set it to 300, wait at least the full 3600 seconds from publication before changing the address. This gives resolvers that received the old answer just before the change time to let its original cache time expire. These numbers are a calculation example; supported values and sensible standard values depend on your DNS provider.
If you lower the TTL only when changing the address, that does not shorten a record that is already cached. Amazon explicitly documents this effect for Route 53. The TTL values of A, AAAA, and SRV records can expire independently; check each record players need to connect. (Amazon Route 53: Changes do not take effect immediately)
Change the address during the maintenance window
Prepare the new endpoint and check it directly before changing the public address. During the maintenance window, update the affected records in their authoritative zones: A for IPv4, AAAA for IPv6, and, if needed, SRV for the target host or game port. For Minecraft Java, the A or AAAA address of the SRV target host provides the endpoint; change that address if the target host should point to the new server. Update the SRV record if the target host or game port changes (RFC 2782). Do not leave an outdated AAAA address in place if the new server is not reachable through it. An SRV record that still points to the old target host or port is also an old connection path.
DNS may return old and new answers side by side during a transition because different resolvers filled their caches at different times. Plan for a maintenance window, not a minute-by-minute cutover. If the old endpoint remains available, keep it in a state that does not create a second independently playable world. Two instances with separate write states make a safe rollback harder.
Changing A, AAAA, or SRV in the same zone is not a nameserver migration. If you also change the authoritative nameservers, plan the delegation and any DNSSEC configuration separately, following your DNS provider's instructions. Changing the A-record TTL does not control the cache time of nameserver delegation. (Amazon Route 53: Changes do not take effect immediately)
Check the new answers and TTL
Query the affected names again and compare the type and target with your change plan:
dig +noall +answer play.example.com A
dig +noall +answer play.example.com AAAA
dig +noall +answer _minecraft._tcp.play.example.com SRV
Once published successfully, the answers show the new addresses or the new SRV target host and port. Also check the authoritative nameservers listed for the zone by your DNS provider. Repeat the query later from a second network or with a different resolver if players are still receiving the old address. A DNS answer does not confirm that the new game server is running or that its port is reachable; test joining with an actual game client.
If an SRV name did not exist before, a resolver may also cache a negative answer. With NXDOMAIN or an answer without a matching record, the negative cache time may come from the SOA record. As a result, a newly created SRV record may still be missing from some queries even though the authoritative record is now present. In that case, also check the SOA section of the response; it is a different cache time from the TTL of an existing A or SRV record. With BIND dig, you can request this section specifically: (RFC 2308, BIND 9: dig)
dig +noall +authority _minecraft._tcp.play.example.com SRV
After the move
When the new answers are stable and the connection path has been checked with a client, restore the affected TTL values to the value intended for your operation. Keep the previous DNS values as a rollback note. Do not change the TTL with the goal of deleting old answers immediately. If the new name resolves correctly but a connection is refused or times out, check the server status, game port, and network path using the Connection refused and timeout guide.
Sources
- RFC 1035: DNS resource records and TTL – TTL is specified in seconds and limits the cache time of a resource record.
- RFC 2782: DNS SRV Record – the SRV target host needs its own address records; the record contains the target host and service port.
- RFC 2181: DNS clarifications – clarifies TTL semantics.
- RFC 2308: Negative DNS caching – SOA-based cache time for NXDOMAIN and missing record types.
- RFC 3596: AAAA records – meaning of the IPv6 address record.
- Amazon Route 53: Changes do not take effect immediately – old TTLs and nameserver caches during changes; Route 53 documentation, not a timing guarantee for other providers.
- BIND 9: dig – format of compact DNS queries.
- IANA: Special-Use Domain Names, IANA: Example Domains, IPv4 Address Space, and IPv6 Special-Purpose Address Space – documentation names and reserved example addresses.
Did this guide help? We are happy to help personally.