Opscraft
DNS record types · Lesson 5 of 7 · 3 min read

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.com has a TXT record only, the wildcard won't supply its A record (it returns NODATA).
  • It covers only one level (a.b.example.com needs *.b.example.com).
  • It can hide typos ("why does prdo.example.com work?") and widen phishing surfaces.

Delegating subdomains

To let another team or AWS account manage dev.example.com:

  1. Create a hosted zone dev.example.com in their account (Route 53 assigns four name servers).
  2. In the parent example.com zone, add an NS record for dev.example.com with those four servers.

Now the dev account controls everything under dev.example.com with its own IAM permissions — a clean multi-account pattern.

Enlarge diagramPRODUCTION ACCOUNTDEV ACCOUNTzone: example.comNS record for dev.example.com → ns-11…,ns-22…, ns-33…, ns-44…zone: dev.example.comits own records, managed with the devaccount's IAM permissionsdelegates
Figure 1. Delegating a subdomain to another AWS account: the parent zone holds NS records that hand dev.example.com to the child zone's name servers.
Swipe sideways to see all of it, or tap to open it full screen.

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 permission route53:ChangeResourceRecordSets scoped 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.