Wildcards, delegation and automation
Wildcard records
*.example.com. IN A 203.0.113.10 answers for any name that has no records of its own — anything.example.com, typo.example.com. Gotchas:
- It doesn't match names that exist with other types — if
api.example.comhas a TXT record only, the wildcard won't supply its A record (it returns NODATA). - It covers only one level (
a.b.example.comneeds*.b.example.com). - It can hide typos ("why does
prdo.example.comwork?") and widen phishing surfaces.
Delegating subdomains
To let another team or AWS account manage dev.example.com:
- Create a hosted zone
dev.example.comin their account (Route 53 assigns four name servers). - In the parent
example.comzone, add an NS record fordev.example.comwith those four servers.
Now the dev account controls everything under dev.example.com with its own IAM permissions — a clean multi-account pattern.
Private records
Records for internal-only services (db.internal.example.com, payments.svc.internal) belong in a Route 53 private hosted zone associated with your VPCs, so they never leak to the internet.
Weighted, latency and other routing records
Route 53 routing policies (weighted, latency, failover, geolocation...) are implemented as multiple records with the same name and type, each with a set identifier and policy settings (e.g. weight). Covered in the routing policies topic.
Kubernetes and DNS automation
- External DNS watches Ingresses and Services and creates/updates Route 53 records from annotations such as
external-dns.alpha.kubernetes.io/hostname: shop.example.com— it needs IAM permissionroute53:ChangeResourceRecordSetsscoped to specific zones (via IRSA), and uses TXT "ownership" records so it only touches records it created. - Headless Services get A/AAAA records per ready pod (and SRV records for named ports); StatefulSet pods get stable names like
kafka-0.kafka.data.svc.cluster.local. - Manage records as code with Terraform (
aws_route53_record) or External DNS, reviewed in Git, rather than console clicks.
Moving DNS providers: the forgotten records
When migrating a zone, teams remember A and CNAME records and forget: MX, TXT (SPF, DKIM, DMARC, verification tokens), CAA, SRV, and NS delegations for subdomains. Export the full zone, diff old vs new by querying both providers' name servers directly, and only then switch NS at the registrar.