Route 53 rejects your change with "RRSet of type CNAME with DNS name example.com. is not permitted at apex in zone example.com."
BeginnerTroubleshootingDNS, TLS and certificates
Answer
Likely causes → DNS rules forbid a CNAME at the zone apex, because the apex must also carry SOA and NS records and a CNAME can't coexist with other records.
Diagnose → You're trying to point example.com at a hostname like an ALB or CloudFront distribution (my-alb-123.ap-south-1.elb.amazonaws.com).
Fix → Use a Route 53 ALIAS A/AAAA record that targets the ALB or CloudFront distribution:
resource "aws_route53_record" "apex" {
zone_id = var.zone_id
name = "example.com"
type = "A"
alias {
name = aws_lb.app.dns_name
zone_id = aws_lb.app.zone_id
evaluate_target_health = true
}
}
Other providers have equivalents (Cloudflare CNAME flattening, ANAME).
Prevent → Standardise on ALIAS records for anything that points at AWS-managed endpoints, apex or not.
More on DNS, TLS and certificates
Monday morning every browser shows "NET::ERR_CERT_DATE_INVALID" for app.example.com; the cert is from Let's Encrypt via cert-manager.BeginnerYou changed the A record for api.example.com to a new load balancer an hour ago, but some users still reach the old server.BeginnerA cert-manager Certificate is stuck at "Issuing"; the Challenge says "Waiting for HTTP-01 challenge propagation: wrong status code '404', expected '200'".IntermediateAfter switching to a slim base image, the service fails every outbound HTTPS call with "x509: certificate signed by unknown authority".BeginnerBrowsers load the site fine, but Android apps and `curl` from servers fail with "unable to verify the first certificate" or "unable to get local issuer certificate".Intermediate`https://example.com` works, but `https://www.example.com` shows "NET::ERR_CERT_COMMON_NAME_INVALID".Beginner