Why a DNS backup matters

Someone who gains access to a DNS account may be able to redirect a website, disrupt email, or add records that appear to belong to your domain. A backup cannot prevent those changes, but it can show what the zone looked like before the incident. That makes it easier to identify unfamiliar records and rebuild the intended configuration once the account is secure.

Create a baseline while everything is working, rather than waiting until something breaks. Update it whenever you make an intentional DNS change. If you discover suspicious activity, preserve a copy of the affected settings separately before editing them; that copy may help you understand what changed. Do not treat it as the version to restore.

Capture the full configuration, not just the website address

Start with a zone export if your DNS provider offers one. Also keep a readable inventory of each record’s name, type, value and time to live (TTL). Include A and AAAA records for addresses, CNAME records for aliases, MX records for mail routing, and TXT records used for domain verification or email authentication. Check less visible entries too, such as CAA records, wildcard records, and records for important subdomains. An export may omit provider-specific features, so document settings such as redirects or managed records separately.

The zone is only part of the picture. Record which provider hosts your authoritative DNS and which nameservers are assigned at the registrar. If DNSSEC is enabled, document the configuration and the DS record at the registrar. These details matter because restoring zone records at the wrong provider will not help if the domain points elsewhere. Likewise, a mismatch between DNSSEC settings and the registrar’s DS record can prevent successful lookups.

Keep a short note explaining the purpose of important records. For example, an MX record may serve the main mailbox provider, while a particular TXT record may authorize a separate mail-sending service. This context helps you distinguish a legitimate setting from an unfamiliar addition.

Store backups without creating another security risk

Keep dated versions so an unauthorized change does not quietly replace your only known-good copy. A simple process is to save an export after each approved change and retain older versions according to your organization’s needs. Label backups with the domain, provider and export date, and restrict access to people responsible for recovery. If you use cloud storage, review who can open or alter the files. An encrypted copy stored separately from the DNS account can be useful if that account becomes inaccessible.

DNS records are generally intended to be public, but backup files can still reveal how your services are organized. Do not place account passwords, recovery codes, API tokens, or DNSSEC private keys in a plain zone inventory. If recovery requires separate credentials or private key material, manage those through an appropriate secure process rather than attaching them to the export. Periodically check that you can read an older backup and understand which version represents an approved configuration.

Regain control before restoring records

If you suspect an account compromise, first secure the affected DNS and registrar accounts. Change credentials from a trusted device, review account recovery methods, enable or re-establish multifactor authentication, and remove unfamiliar users, sessions and API tokens where the services allow it. Check the registrar’s nameserver assignment before editing the zone. Otherwise, you might repair records in one account while the domain still delegates to an attacker-controlled service.

Compare the current configuration against your last known-good backup and a list of approved changes made since it. Remove unauthorized records and restore missing or altered ones. Pay particular attention to website destinations, MX records, SPF and DMARC policies, DKIM selectors, CAA records, and verification records. Avoid replacing the entire zone without review: a full import could erase legitimate changes made after the backup or conflict with records managed automatically by your provider. If DNSSEC was changed, coordinate the zone-side settings with the registrar’s DS record.

Verify recovery and improve the next backup

After restoring settings, query the authoritative nameservers to confirm they serve the intended records. Then check from a normal resolver as well. Cached answers may continue to appear until their TTLs expire, so an old response does not always mean the repair failed. Test the services that depend on the zone: open the website using its domain, check important subdomains, and confirm that email can be received and sent. These checks complement a record-by-record comparison because they can reveal settings you forgot to document.

Finally, review how the compromise happened and which parts of recovery were difficult. Update access controls, the inventory and the backup procedure accordingly. A useful DNS backup is more than an export file: it is a protected, understandable record of the configuration, paired with a practical way to verify that the domain is working again.

Back to category ↗