---
title: "Shorten the TTL before you move a record · Agent Wranglers"
url: https://agentwranglers.se/playbook/infrastructure/networking-and-dns/lower-ttl-before-changes
updated: 2026-10-20
licence: "All rights reserved"
---

# Shorten the TTL before you move a record

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Recommended
- Chapter: [Networking and DNS](https://agentwranglers.se/playbook/infrastructure/networking-and-dns)
- Rule: Before you point a name at a new server, shorten its TTL and wait one full old TTL. Restore the longer TTL after the move.
- How: Resolvers keep an answer for as long as its TTL says. Change the TTL from 3600 to 300 seconds, at least 3600 seconds before the move. After the move, a mistake then lasts 5 minutes instead of an hour. When the new server has run cleanly for a day, set the TTL back to 3600.
- Check: Before the move window, `dig` on a public resolver shows a TTL of 300 or less for the name.

Example:

```sh
dig +noall +answer shop.example.com @1.1.1.1   # shop.example.com. 300 IN A 203.0.113.10
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers infrastructure playbook: https://agentwranglers.se/playbook/infrastructure/networking-and-dns/lower-ttl-before-changes`.

- Previous: [Keep DNS records in code](https://agentwranglers.se/playbook/infrastructure/networking-and-dns/dns-as-code)
- [Networking and DNS](https://agentwranglers.se/playbook/infrastructure/networking-and-dns)
