DNS Demystified 7: Third-Party DNS Providers and Nameserver Management
In the previous article we built our own authoritative DNS server with BIND9. That works well — but for production public-facing domains, most organisations use a managed DNS provider. This article explains when to self-host, when to outsource, how to compare providers, and the exact procedure for migrating nameservers.
| Factor | Self-Hosted (BIND/NSD) | Managed (Cloudflare/Route53) |
|---|---|---|
| Control | Full — every zone file detail | Limited to provider’s feature set |
| Anycast | Requires BGP + multi-region VPS | Included — global network |
| DDoS protection | Your problem entirely | Absorbed by provider’s edge network |
| DNSSEC | Manual ZSK/KSK key management, resigning | One-click enable, automatic key rollover |
| API | None — manual zone file edits + rndc reload | Full REST API (Cloudflare, Route53, NS1) |
| Cost | Server + bandwidth + multi-region | Free tier or per-query pricing |
| SLA | Your uptime (typically no SLA) | 100% uptime SLA (with credits) |
| Geographic distribution | Need VPS in every region | Global anycast from day one |
Reference: “DNS and BIND” by Cricket Liu (5th Ed., O’Reilly) — Chapter 11 covers DNS security, including the risks of running authoritative servers without DDoS protection.
| Provider | Anycast | Free Tier | DNSSEC | API | Secondary DNS | Standout Feature |
|---|---|---|---|---|---|---|
| Cloudflare DNS | 330+ cities | Yes | One-click | Full REST | AXFR incoming | Fastest TTFB globally, CDN + DNS integrated, DDoS protection included |
| AWS Route53 | 100+ locations | 50 zones, 1M queries/mo | One-click | AWS SDK / Boto3 | Health checks | Deep AWS integration (ALB, S3, CloudFront), latency-based routing |
| Google Cloud DNS | 100+ locations | Per-zone per-query | One-click | gcloud CLI / API | AXFR incoming | Simplest managed DNS, no extras, IAM integration |
| NS1 | Global anycast | 500k queries/mo | One-click | Full REST | AXFR incoming | Traffic steering via filter chains (geo, ASN, latency) |
| dnsimple | Global anycast | Paid ($3/mo) | One-click | Full REST | Built-in secondary | Domain registration + DNS in one, clean UI |
| DNSMadeEasy | Global anycast | Paid only | One-click | Full REST | Built-in secondary | Enterprise monitoring, TCP health checks, failover |
Cloudflare operates one of the largest anycast networks globally — 330+ cities in 120+ countries. Their DNS is free, fast, and includes DDoS protection (both DNS-layer and HTTP-proxy). Most domains using Cloudflare DNS also proxy HTTP traffic through Cloudflare’s CDN, which hides the origin IP.
For rootlog.in, Cloudflare would be the simplest option:
rootlog.in — Cloudflare automatically scans existing DNS recordsCurrent: dns1.p01.nsone.net, dns2.p01.nsone.net
New: dave.ns.cloudflare.com, meera.ns.cloudflare.com
Reference: Cloudflare DNS documentation — https://developers.cloudflare.com/dns/ Reference: Cloudflare API — https://api.cloudflare.com/
Route53 is tightly coupled with AWS services. If your infrastructure runs on EC2, ALBs, and S3, Route53 is the natural choice. It supports health checks that automatically fail over DNS records when an endpoint goes down — for example, routing traffic away from a failed AZ.
Route53 charges per hosted zone ($0.50/month per zone) and per million queries ($0.40/M for standard queries). The free tier covers 50 zones and 1M queries per month.
Pro tip: Route53 Alias records (a Route53-specific extension) let you point a zone apex to an AWS resource (ELB, CloudFront, S3 bucket) without using a CNAME. This is not standard DNS — it works only because Route53 is both the DNS provider and the AWS resource operator.
Reference: AWS Route53 documentation — https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/
NS1 offers filter chains that let you route traffic based on geolocation, ASN, latency, or custom metadata. This is useful for global applications that need to direct users to the nearest datacenter or apply blue/green deployments at the DNS level.
This is one of the most misunderstood concepts in DNS. They serve different roles.
| Role | Responsibility | Example |
|---|---|---|
| Registrar | Domain registration, renewal, WHOIS management. Sets the NS records in the TLD zone. | Namecheap, GoDaddy, Cloudflare Registrar, Porkbun |
| DNS Provider | Hosts the zone file and serves DNS records for the domain. | Cloudflare DNS, Route53, AWS, self-hosted BIND |
You buy the domain from the registrar. You point it to your DNS provider by setting the nameservers. The DNS provider hosts the actual records (A, MX, TXT, etc.).
You can and should use different companies for registration and DNS. For example:
This separation means your DNS is not affected if your registrar has an outage. A registrar outage takes down the management interface, but the NS records in the TLD are already set to point to your DNS provider — those do not change until you explicitly update them.
Real-world context: In 2021, a major registrar experienced a multi-hour outage that prevented customers from logging into their control panel. Customers who used the registrar’s own DNS had their domains go unresolvable. Customers who used separate DNS providers (Cloudflare, Route53) had no interruption — their nameservers were already delegated and continued serving normally.
Switching DNS providers is a controlled process. Here is the exact procedure:
Before touching anything, dump all records from your current provider:
# Zone transfer if allowed
dig @dns1.p01.nsone.net rootlog.in AXFR
# Alternatively, query each record type
dig @dns1.p01.nsone.net rootlog.in A +short
dig @dns1.p01.nsone.net rootlog.in MX +short
dig @dns1.p01.nsone.net rootlog.in TXT +short
dig @dns1.p01.nsone.net rootlog.in NS +shortIf AXFR is blocked, manually list all records from the provider’s dashboard.
Add all records to the new provider’s DNS console. Match TTLs exactly. Export the zone to a scriptable format for repeatability.
Set all TTLs to 300 seconds (5 minutes) on the current provider. This ensures that when you switch, old cached records expire quickly. Wait at least 48 hours for all resolvers to pick up the new low TTL.
# Verify the new TTL is served by authoritative servers
dig @dns1.p01.nsone.net rootlog.in A +ttlidQuery the new provider’s nameservers directly:
dig @dave.ns.cloudflare.com rootlog.in A
dig @dave.ns.cloudflare.com rootlog.in MX
dig @dave.ns.cloudflare.com rootlog.in TXTEvery record must match the current authoritative server exactly. Pay special attention to MX priorities and TXT record quoting.
Log into your registrar and replace the old nameservers with the new ones:
Old: dns1.p01.nsone.net
dns2.p01.nsone.net
New: dave.ns.cloudflare.com
meera.ns.cloudflare.com
Check that the TLD has picked up the new nameservers:
dig rootlog.in NS +short
dig @a.gtld-servers.net rootlog.in NS +additionalThe TLD query confirms the delegation has changed. The +additional flag shows glue records.
Due to the low TTLs set in Step 3, most recursive resolvers will pick up the new NS records within minutes. Monitor resolution from multiple public resolvers:
dig @1.1.1.1 rootlog.in
dig @8.8.8.8 rootlog.in
dig @9.9.9.9 rootlog.inUse global DNS checkers for geographic verification:
After confirming that all resolvers serve the new data, increase TTLs back to their original values.
Most managed DNS providers support incoming zone transfers (AXFR) from your self-hosted BIND server. This lets you manage the zone locally and automatically sync to the cloud.
On your BIND server, allow Cloudflare’s IPs to transfer:
zone "rootlog.in" {
type master;
file "/etc/bind/zones/db.rootlog.in";
allow-transfer { 103.21.244.0/24; }; # Cloudflare transfer IPs
also-notify { 103.21.244.0/24; };
};In Cloudflare, enable zone transfer and enter your BIND server IP. Cloudflare will pull the zone automatically when the serial increments. This setup is called a hidden master — the BIND server is not publicly resolvable as an NS, but it is the source of truth for the zone.
AWS Route53 does not support secondary DNS via AXFR. You must use the Route53 API (via AWS SDK, CLI, or cli53 tool). For automated sync, write a script that:
dig AXFR from the BIND masterchange-resource-record-sets formataws route53 change-resource-record-setsManaged DNS providers offer APIs that let you update records programmatically. This is useful for:
curl -X PUT "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records/$RECORD_ID" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
--data '{"type":"A","name":"home.rootlog.in","content":"203.0.113.42","ttl":120,"proxied":false}'aws route53 change-resource-record-sets \
--hosted-zone-id Z123456789 \
--change-batch '{
"Changes": [{
"Action": "UPSERT",
"ResourceRecordSet": {
"Name": "home.rootlog.in",
"Type": "A",
"TTL": 120,
"ResourceRecords": [{"Value": "203.0.113.42"}]
}
}]
}'The nsupdate utility (part of BIND) sends dynamic DNS update messages per RFC 2136:
nsupdate <<EOF
server 203.0.113.10
zone rootlog.in
update delete home.rootlog.in A
update add home.rootlog.in 120 A 203.0.113.42
send
EOFThis requires the target server to accept dynamic updates, typically restricted via TSIG (shared secret) authentication (RFC 2845).
Reference: RFC 2136 — Dynamic Updates in the Domain Name System (DNS UPDATE). https://datatracker.ietf.org/doc/rfc2136/ Reference: RFC 2845 — Secret Key Transaction Authentication for DNS (TSIG). https://datatracker.ietf.org/doc/rfc2845/
Even with a managed primary DNS provider, you should configure a secondary DNS server on a different provider. This ensures DNS resolution continues if your primary provider has an outage.
# Configure BIND as a slave to Cloudflare
zone "rootlog.in" {
type slave;
file "/var/cache/bind/db.rootlog.in";
masters { 173.245.58.73; }; # Cloudflare NS IP
};Or use a specialised secondary DNS service:
RFC standards forbid CNAME records at the zone apex. However, many managed DNS providers support CNAME flattening (also called ANAME or ALIAS records), which resolves the CNAME target transparently and serves the resulting A/AAAA records directly.
This is essential when hosting on platforms that provide a single hostname:
username.github.iosite-name.netlify.appproject-name.vercel.appd123.cloudfront.netWith Cloudflare, this is called CNAME flattening and is enabled by default for proxied records. With Route53, Alias Records provide the same functionality but only for AWS resources.
For maximum resilience, run authoritative DNS across two providers simultaneously:
List both provider’s NS records at your registrar. Recursive resolvers will try one provider, and if it fails, fall back to the other. This is the enterprise-grade DNS architecture.
This concludes the DNS Demystified series. You now understand the full stack — from root servers and resolvers to zone files, troubleshooting, self-hosted BIND, and managed DNS migration.
Related Articles
DNS Demystified 7: Third-Party DNS Providers and Nameserver Management
When to use managed DNS vs self-hosted, how to switch nameservers, and a comparison of Cloudflare, Route53, Google Cloud DNS, NS1, and dnsimple.
DNS Demystified 6: Building Your Own DNS Server for rootlog.in
Types of DNS servers and a step-by-step guide to setting up BIND9 as an authoritative nameserver for the rootlog.in domain.
DNS Demystified 5: TTL, Propagation, /etc/hosts, and Linux Resolution Order
TTL mechanics, propagation delay myth-busting, /etc/hosts tricks, and the Linux name resolution order via nsswitch.conf.