CNAME vs. Alias Records in AWS Route 53

When mapping an AWS resource (e.g., Load Balancer, CloudFront) to a domain, you have two options:

  1. CNAME Records
  2. Alias Records (specific to AWS)

Understanding when to use each is crucial for DNS management in AWS.


What is a CNAME Record?

A CNAME (Canonical Name) record allows you to map a domain name to another hostname.

Example:

app.mydomain.com → blabla.anything.com

Here, app.mydomain.com points to another domain instead of an IP address.

Limitations of CNAME Records


What is an Alias Record?

Alias records are AWS-specific DNS records that allow mapping directly to AWS resources.

Key Features of Alias Records

✔️ Can be used at both root domains and subdomains

✔️ No additional cost (unlike CNAME queries)

✔️ Supports AWS services (e.g., ALB, CloudFront, S3 Websites)