Skip to content

CNAME vs ALIAS

CNAME vs ALIASΒΆ

AWS Resources ([[Load Balancer]], Programming/AWS/CloudFront/AWS CloudFront etc) expose an [[AWS URL]] (lb1-1234.us-east-2.elb.amazonaws.com) and you want it to be myapp.mydomain.com - CNAME: - Points a URL to any other URL. (app.mydomain.com => xyz.anything.com) - [[Alias]] - Points a URL to AWS resource (app.mydomain.com => xyz.amazonaws.com) - Works for root domain and non-root domain - Free of charge - native health checks

So, for subdomains we can create both CNAME and [[ALIAS]] for our [[load balancer]], but alias would be the recommended way to go. For root domain, we can only use ALIAS.