procedure Domains & DNS
Change a DNS record safely
Make a DNS change with an exact record scope, saved rollback values, authoritative verification and realistic cache expectations.
What it means
Changing a DNS record safely means changing the intended RRset in the active authoritative zone, after recording its previous state and preparing a way back. This is a real operational procedure, not a simulation or a tool that applies DNS updates for you. Verify access and scope before any mutation. Records published by the authoritative DNS service and answers returned from recursive caches are separate observations. DNS zones Cached DNS answers
This page describes a low-risk approach for an approved web A/AAAA or www CNAME change. It is not permission to replace NS delegation, modify MX targets, remove TXT authentication records, or perform an unplanned mail migration. If the service is critical, use its established change window and approved rollback process.
Try it
Example — one record change sheet. This is a fictional plan, not a live DNS output or a value to deploy.
Zone: example.com (confirm this is the delegated zone)
Owner and type: www.example.com. / A
Old RRset: 192.0.2.10 TTL 300 s
Proposed RRset: 192.0.2.20 TTL 300 s
Unchanged: MX, TXT, CAA, NS, SOA, unrelated A/AAAA
Validation: destination serves intended host and HTTPS
Rollback: restore saved old RRset and TTLBoth IPs are documentation-only. The plan's essential property is the exact owner/type: it is much narrower than changing all records for the domain. A rollback repairs authoritative data but cannot erase copies still cached elsewhere; keep both old and new endpoints operational when feasible. RRset semantics
Before editing
- Confirm you are authorized to update the domain and identify the actually delegated authoritative nameservers. Editing a duplicate or inactive provider zone may have no public effect.
- Capture the current DNS RRset, name, type, TTL and all relevant zone records. Save MX, SPF/DKIM/DMARC TXT and selector names, CAA, NS/SOA and any non-web subdomains. Never replace the zone wholesale merely to edit one web record.
- Obtain approved replacement hostname/IP values from the hosting provider. Stage and verify the new website and TLS for the intended hostname before changing DNS. Record old hosting configuration and establish a rollback owner.
- Compare existing CNAME restrictions and address-family requirements. A standard CNAME cannot coexist with ordinary RR types at its owner; do not place one at a zone apex that already requires NS/SOA. CNAME restrictions
- Evaluate current cached TTL and change timing. A reduced TTL applies to newly fetched answers, not old copies already held by caches. Negative cached responses may matter when creating a previously nonexistent hostname. Negative caching
Make the bounded change
- In the verified authoritative DNS control panel, edit only the approved owner and record type. Keep the old record set in the change log. If multiple authoritative zones/providers exist, resolve their ownership first.
- Save the exact new record(s), taking care to avoid accidental extra A/AAAA values, mistyped labels, or converting an A value into a CNAME target incorrectly.
- Read back the authoritative answer from each appropriate server after the provider confirms publication. An optional read-only BIND
digpattern is shown below; replace the placeholder server with the confirmed authoritative server and do not treat the sample IP as a real operator endpoint. dig usage
dig @ns1.example.net www.example.com. A +norecurse +noall +answerThat example is a command shape, not an expected live result. +answer may be empty on errors; for diagnosis use the full status/header, and verify the aa flag and actual server identity. If your system lacks dig, use your operator's read-only DNS query facility.
Verify and roll back if needed
- Compare selected recursive resolver answers after authoritative data is correct; record the resolver used, exact query type and remaining TTL. Disagreement during valid cached lifetimes does not automatically mean the edit failed. Serve-stale behavior may complicate exceptional failures. Stale data
- Check real HTTP and HTTPS behavior from representative networks after DNS and network selection. A successful DNS answer is not a successful application check. Preserve old hosting capacity until relevant caches and business requirements permit retirement.
- If the new endpoint fails, restore the saved authoritative RRset and TTL promptly through the approved panel, then verify authoritative replies and dependent application health. Visitors may temporarily see either value; rollback itself is a new DNS change, not a global cache flush. Escalate risky NS/DNSSEC or email changes to the responsible operator.
In practice
Use the change sheet as your minimum audit trail: what was modified, who approved it, original and new values, when authoritative records changed, and how verification and rollback worked. See A DNS change is not visible for read-only fault isolation, and MX record for why mail must be preserved.
Sources & model boundaries
Primary references used for this explanation. The example above is illustrative; it is not a live check.
- RFC 1034 — Domain Names: Concepts and Facilities
Sections 2.4, 3.1, 4.3.2 and 5. DNS tree, zones, referrals, resolvers and caching.
Checked .
- RFC 1035 — Domain Names: Implementation and Specification
Sections 3.2, 3.3 and 4. RR formats, TTL, A, NS, SOA, CNAME and MX records.
Checked .
- RFC 2181 — Clarifications to the DNS Specification
Sections 5 and 10. RRsets, CNAME coexistence, and MX/NS alias restrictions.
Checked .
- RFC 2308 — Negative Caching of DNS Queries
Sections 3–6. NXDOMAIN and NODATA negative cache behavior and TTL.
Checked .
- RFC 8767 — Serving Stale Data to Improve DNS Resiliency
Sections 3–7. Conditional stale-answer behavior during authoritative DNS difficulties.
Checked .
- ISC BIND 9 — dig manual
dig: syntax, @server, +noall, +answer, +norecurse. dig performs DNS queries and can select specific resolver or authoritative servers.
Checked .