Search code examples
amazon-web-servicesdnsamazon-route53

AWS Route53 Error, trying to CNAME domain name to loadbalancer dns


Situation:

  1. I have one loadbalancer which is serving a kubernetes cluster, and it has a dns name
  2. I have my website domain, registered in route53 zone, and want to CNAME this to the dns of the loadbalancer

The initial records of the zone right after creation are: enter image description here Then I try to add the CNAME record of pointing mydomain.com to the loadbalancer DNS, and get the error shown in image: enter image description here

My question is now:

How can I use mydomain.com to access the loadbalancer ? and still manage the dns records with route53 (i have other records for cdn etc in real domain aside root one that want to use for the loadbalancer serving the website)


Solution

  • I think that for this AWS specific solution, can use ALIASES instead of CNAME records to point the domain to a particular AWS Resource (loadbalancer in my case). Aliases are DNS extensions for AWS system only

    https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-choosing-alias-non-alias.html

    Still this is very interesting question, and assuming no alias was possible, does it mean that you never can CNAME your bought root domain to some other domain ?