Interview questions and model answers
"Why can't you put a CNAME at the zone apex, and how do you point example.com at an ALB?"
A CNAME can't coexist with any other record at the same name, and the apex must hold the zone's SOA and NS records. In Route 53 I use an alias A (and AAAA) record targeting the ALB: it works at the apex, returns the ALB's current IPs, follows them as they change, supports evaluate-target-health, and queries are free. Other providers call this ALIAS/ANAME or CNAME flattening.
"Why not just use an A record with the ALB's IP?"
ALB IP addresses change as the load balancer scales and replaces nodes, so a hardcoded A record eventually points to an IP that isn't yours. An alias or a CNAME to the ELB DNS name always tracks the current IPs.
"Our emails land in spam. What DNS records do you check?"
SPF — a single TXT v=spf1 record that includes the actual sending service and stays under ten lookups. DKIM — the selector record exists and the service signs with our domain. DMARC — a policy record, with alignment between the From domain and the SPF/DKIM domains. And PTR/reverse DNS and reputation for the sending IP. I'd read the Authentication-Results header of a delivered message to see which check fails.
"How would you roll out DMARC safely?"
Publish p=none with aggregate reporting, use the reports to find every legitimate sender and fix their SPF/DKIM alignment, then move to quarantine, possibly with a percentage, and finally reject. That way no legitimate mail is lost during rollout.
"What's the difference between NXDOMAIN and NOERROR with no answer?"
NXDOMAIN means the name doesn't exist at all. NOERROR with an empty answer — NODATA — means the name exists but has no record of the requested type, like asking for AAAA on an IPv4-only host. They lead to different fixes: create the name versus add the record type.
"What is a dangling CNAME and why is it dangerous?"
A CNAME pointing to a third-party resource you've deleted, like an S3 website bucket or a Heroku app. Someone else can claim that resource name and serve content under our subdomain. Prevent it by deleting DNS records along with the resources — ideally in the same Terraform — and auditing CNAMEs for missing targets.
"How do you give the dev AWS account control of dev.example.com?"
Create a public hosted zone for dev.example.com in the dev account, then add an NS record set for dev.example.com in the parent zone listing that hosted zone's four name servers. The dev account then manages its own records with its own IAM, and the parent stays untouched.
"What does an SRV record contain and where would you see one?"
Priority, weight, port and target host for a named service and protocol, like _ldap._tcp.example.com. Clients use it to discover where and on which port a service runs — Active Directory, SIP, MongoDB's mongodb+srv connection strings, and Kubernetes Services with named ports.