dns migration · 12 min read
How to Import DNS Records Without Breaking Production
Learn how to import DNS records from any provider without dropping traffic — from exporting a clean zone file to validating every record and cutting nameservers over with confidence.
To learn how to import DNS records without breaking production traffic, you must stage your entire record set on the new authoritative nameserver, validate record syntax directly against those servers, and lower your Time-to-Live (TTL) values before updating delegation at the registrar. Executing a successful zone migration requires a disciplined sequence: audit existing configurations, normalize proprietary zone attributes, confirm resolution through direct queries, and execute nameserver cutover.
When engineering teams discover how to import dns records during an infrastructure re-platform or vendor consolidation, they often treat the task like importing a CSV file into a database. DNS is a globally distributed, cached, eventually consistent directory. A missing record causes resolving nameservers across the world to return NXDOMAIN or stale cached answers for hours. Following a systematic methodology ensures zero dropped queries whether you manage 20 records or 4,000.
The import is the easy part: the cutover is where zones break
DNS migrations rarely fail because of a syntax error during upload. Modern tools reject malformed records immediately. Migration failures occur when valid records behave unpredictably after delegation changes. These failures stem from TTL mismatches, proprietary zone apex records that do not resolve cleanly, and outdated caching state in recursive resolvers.
A production migration contains three phases:
- Freeze changes and extract every record set, priority value, and metadata tag from your incumbent system.
- Normalize the syntax, translate proprietary configurations, and verify answers directly against the new authoritative servers before registrar changes.
- Adjust parent nameservers, monitor resolver traffic, and allow cached records to expire cleanly.
This checklist applies to small single-host zones and complex multi-cluster domains alike. DNSCove's one-step zone import accepts a standard BIND-format zone file, meaning the export format you obtain from an authoritative provider works as your direct input format with minimal cleanup.
Step 1: Export a complete, authoritative inventory of your zone
Do not rely on screenshots or manual copying from a provider's administrative dashboard. Cloud control panels often collapse multiple TXT records into single interface fields, hide validation records, or omit system-level SOA and NS records. You need raw zone data.
The approach varies based on your incumbent DNS provider:
- Copy the text zone file directly from
/etc/bindor your primary configuration directory when using BIND or NSD on disk. - Use an API client or CLI to dump the zone from cloud providers, paginating requests if you have large record sets so records are not truncated.
- Pull state files from your CI/CD repository if your zone is managed via tools such as Terraform.
- Use the export zone file feature found in registrar control panels.
A critical operational safeguard: freeze DNS updates across your organization before exporting. Exporting records during a deployment window creates a moving target. If an engineer provisions an ACME SSL challenge or updates an MX record while you export, your copy becomes outdated before import.
Watch out for records that do not show up in naive exports. Apex alias records configured via proprietary cloud features often fail to export as valid BIND records. Similarly, automated verification strings for email routing, DomainKeys Identified Mail (DKIM) selectors, Sender Policy Framework (SPF) records, and Certificate Authority Authorization (CAA) configurations can be buried in sub-panels.
Once you extract your data, perform a live query sweep to cross-check. For a domain using example.com as a reference, compare your exported file against queries made to the active nameserver:
# Query the live authoritative nameserver for core infrastructure records
dig @ns1.incumbent-dns.com example.com MX +noall +answer
dig @ns1.incumbent-dns.com example.com TXT +noall +answer
dig @ns1.incumbent-dns.com example.com CAA +noall +answer
dig @ns1.incumbent-dns.com _sip._tcp.example.com SRV +noall +answer
Count the distinct record sets. If your inventory script finds 142 records while the authoritative server answers for 148, reconcile those 6 missing entries before touching production.
Step 2: Normalize the zone file before you import it
A standard zone file adheres to RFC 1035 formatting, but minor syntax quirks cause parsers to fail. Reviewing your file against our guide on DNS zone file syntax errors will help you isolate anomalies before initiating a bulk import.
Watch for the trailing-dot trap. In standard BIND zone files, a fully qualified domain name (FQDN) must terminate with a dot. If you omit the dot at the end of an entry, the parser appends the $ORIGIN directive to the target. For example:
; Incorrect: resolves to app.example.com.example.com.
app IN CNAME ingress.cloudprovider.net
; Correct: resolves to ingress.cloudprovider.net.
app IN CNAME ingress.cloudprovider.net.
Another major issue is apex record handling. RFC 2181 clarifies that a CNAME record cannot coexist with other data at the same name. Per RFC 2181, this rule prohibits placing a CNAME at the root zone (apex) because root domains must contain SOA and NS records. Legacy DNS systems solved this with proprietary aliases, such as AWS Route 53 Alias, Cloudflare CNAME flattening, or ALIAS/ANAME pseudo-records.
DNSCove supports apex ALIAS records (CNAME-at-apex flattening, like Route53 Alias) with serve-stale protection. When performing a dns zone file import, you can map your incumbent provider's apex records to standard ALIAS entries:
$ORIGIN example.com.
$TTL 3600
; Zone Apex definition using ALIAS
@ IN SOA ns1.dnscove.com. hostmaster.example.com. (
2026120101 ; serial
7200 ; refresh
3600 ; retry
1209600 ; expire
300 ) ; minimum
@ IN NS ns1.dnscove.com.
@ IN NS ns2.dnscove.org.
; Apex alias flattened by the authoritative server
@ IN ALIAS elb-123456789.us-east-1.elb.amazonaws.com.
www IN CNAME example.com.
To avoid production interruptions during a zone apex configuration change, inspect your TTL values. Normalizing TTLs 24 to 48 hours prior to nameserver changes reduces cache duration across public recursive resolvers. Set your TTLs to 300 seconds (5 minutes) ahead of cutover, allowing you to update records quickly if an error occurs.
Step 3: Validate the imported zone in a staging context
Do not change registrar nameservers without confirming that the destination authoritative servers already answer requests for your domain. If you update nameserver delegation while the target servers are unconfigured, resolvers hitting those nameservers receive REFUSED or SERVFAIL.
Test the new servers directly using dig with the +norecurse flag. This bypasses resolver caches and targets the nameserver directly:
dig @ns1.dnscove.com example.com A +norecurse
dig @ns2.dnscove.org example.com ALIAS +norecurse
dig @ns1.dnscove.com example.com MX +norecurse
dig @ns1.dnscove.com example.com CAA +norecurse
Automate this diff. Write a script that reads your normalized record list, queries both the incumbent nameserver and the new nameserver, and compares the responses. Ensure the answers match for A, AAAA, MX, TXT, SRV, and CAA sets.
Pay close attention to DNSSEC configuration. DNSCove signs zones with DNSSEC. Algorithm 13 (ECDSA P-256/SHA-256), NSEC3 with RFC 9276 parameters (0 iterations, no salt), and CDS/CDNSKEY published per RFC 7344/8078 for registrar automation. Zone signing keys are held in the control plane under AWS KMS and are not present on the authoritative nameservers. Signatures are refreshed automatically before expiry. Zone-signing keys roll automatically on a 90-day pre-publish schedule, which requires nothing from the customer. The key-signing key is rolled on operator demand rather than on a schedule, because a KSK roll requires a DS change at the registrar.
According to RFC 9276, setting 0 iterations and avoiding salt minimizes computational overhead on validating resolvers while preventing denial-of-service vulnerabilities. Additionally, publishing CDS and CDNSKEY records per RFC 7344 and operational update RFC 8078 allows automated parent-zone DS record updates at participating registrars.
Step 4: Bulk DNS record migration mechanics using API, Terraform, or console
How you upload your zone file depends on your team's workflows and update cadence. For a one-time transition, a console upload is straightforward. For automated environments, API ingestion or Infrastructure as Code (IaC) is preferable.
DNSCove does not expose a Route 53 wire-compatible API in v1; you manage DNS through DNSCove's own JSON API, console, and Terraform guides, and migrate off Route 53 with a one-step zone import. Review our comprehensive Route 53 migration documentation for step-by-step procedures when transferring zones out of AWS.
Executing a bulk dns record migration requires idempotency. If an API call fails halfway through a 500-record batch, re-running the script must not create duplicate records or leave the zone half-populated. Use an upsert strategy or import the complete zone transactionally.
For organizations managing DNS via code, follow our bulk DNS import practices to integrate your zone files into your deployment pipeline.
# Sample API payload for importing a raw BIND zone file via JSON API
curl -X POST https://api.dnscove.com/v1/zones/example.com/import \
-H "Authorization: Bearer $DNSCOVE_API_TOKEN" \
-H "Content-Type: text/plain" \
--data-binary @example.com.zone
If you prefer using Terraform, configure the provider and import the zone into your state file. Running a terraform plan immediately after import should return zero changes, validating that your configuration matches the authoritative state:
# Import the existing zone into Terraform state
terraform import dnscove_zone.primary example.com
# Verify that no configuration drift exists
terraform plan
Step 5: Cut over nameservers without dropping queries
Do not change delegation at your registrar until your records are staged, verified, and their pre-cutover TTLs have lapsed. A structured approach guarantees a zero-downtime cutover.
DNSCove runs two unicast authoritative nameservers (ns1 in NYC, ns2 in Frankfurt), not an anycast network. Plan your monitoring and resolver expectations accordingly. Because DNSCove does not offer AXFR zone transfer or secondary-DNS operation in v1, the new zone is the single source of truth after cutover; keep your old provider's export archived.
Execute the cutover using this sequence:
- Ensure existing NS and SOA TTLs at your previous provider were reduced to 300 seconds at least 48 hours in advance.
- Log in to your domain registrar and replace the old nameserver hostnames with
ns1.dnscove.comandns2.dnscove.org. - Keep the old DNS provider active for at least 72 hours so resolvers caching the old delegation can query the old provider until their parent NS cache expires.
- Revert the NS delegation at the registrar to your old nameservers if query anomalies surface within the first hour.
Read our walk-through on how to change nameservers without downtime to review caching behaviors that affect resolver cutover timing.
Records that do not survive a naive import and what to do instead
Certain proprietary configurations cannot be converted verbatim into standard zone records. Identify these configurations early in the normalization phase to avoid unexpected routing errors.
DNSCove serves standard authoritative records and does not offer GeoDNS, weighted, latency-based, or failover traffic steering in v1. If your previous provider used DNS-level geographic routing or health-checked DNS failover, transition those responsibilities to an upstream application load balancer, reverse proxy, or content delivery network before importing your zone file.
Review AWS documentation on Route 53 alias records to understand how proprietary aliases map to native targets. When migrating these entries to a standard zone file, translate apex pointers to standard ALIAS records and transform subdomains directly into RFC-compliant CNAMEs:
; Previous proprietary format:
; sub.example.com. IN A ALIAS target-elb.amazonaws.com.
; Normalized standard format:
sub.example.com. IN CNAME target-elb.amazonaws.com.
Customer zones are delegated to the shared ns1.dnscove.com / ns2.dnscove.org nameservers; per-customer vanity or white-label nameservers are not supported in v1. Update internal runbooks and technical documentation to reflect these shared nameserver endpoints.
DNSCove does not include dedicated DDoS scrubbing in v1. Evaluate upstream transit filtering and CDN caching strategies if your edge infrastructure experiences high-volume denial-of-service attempts.
Post-import verification and the first 72 hours
After updating delegation at the registrar, monitor propagation across global recursive resolvers. Test resolving paths through various public networks to observe how quickly stale caches clear:
# Query public resolver infrastructure directly
dig @8.8.8.8 example.com A
dig @1.1.1.1 example.com A
dig @9.9.9.9 example.com A
Monitor your services for functional edge cases:
- Issue a test Let's Encrypt certificate using a DNS-01 challenge to prove that automation agents can read and write TXT validation strings correctly.
- Inspect email headers using external diagnostic suites to verify that SPF, DKIM, and DMARC TXT records are read accurately without formatting corruptions.
- Track your server error logs for unexpected
NXDOMAINerrors, which often indicate an omitted subdomain or missing wildcard entry.
DNSCove uses fixed-cost pricing rather than per-zone or per-query metering. Spikes in DNS traffic during cutovers, cache-bust audits, or recursive resolver re-queries will not produce unexpected query overage charges on your bill.
After 72 hours have elapsed and authoritative logs indicate no more queries are arriving at your former provider, remove your API credentials for that provider and archive your original zone export files.
Frequently asked questions
How to import dns records?
To import DNS records, export your current zone into a standard BIND-compatible file, normalize formatting by ensuring trailing dots and converting proprietary aliases, upload the records to your new authoritative provider, test responses directly against the new nameservers using dig, and finally update your NS delegation at the registrar.
Can I import a BIND-format zone file directly, or do I need to convert it first?
You can import a standard BIND-format zone file directly into DNSCove. You only need to edit proprietary records from your old provider, such as proprietary apex aliases or dynamic routing configurations, converting them into standard records or apex ALIAS records before upload.
What happens to my apex CNAME or ALIAS records during an import?
A standard CNAME record cannot legally exist at the zone apex alongside SOA and NS records. During import, apex CNAME or vendor-specific alias entries should be converted into apex ALIAS records. DNSCove dynamically resolves these ALIAS records and returns synthesized A or AAAA responses to querying clients.
How long should I wait between importing records and changing nameservers?
You should wait until you have comprehensively validated every record set against the new nameservers using non-recursive queries, and until your previous nameserver records' TTL values have fully expired. Reducing TTLs 24 to 48 hours prior to nameserver changes allows you to execute the final cutover immediately after import validation passes.
Can an existing provider be maintained as a secondary nameserver?
DNSCove does not offer AXFR zone transfer or secondary-DNS operation in v1. The records configured on DNSCove act as the single source of truth for your zone upon nameserver delegation.
Ready to move? Follow the DNSCove Route 53 migration guide to run a one-step zone import, then verify against the quickstart before you touch delegation.
- No AWS account required
- Zero-downtime Route 53 cutover
- Apex ALIAS / ANAME to any target
- DNS as code — Terraform, CloudFormation
Straight answer: DNSSEC signing isn't available yet — it's on the roadmap. Everything else here works today. Authoritative nameservers: ns1.dnscove.com, ns2.dnscove.org.