2
votes

I have created a new subdomain and have a CNAME record to point that subdomain to AWS ELB. Eg.
example.com A 178.2.2.1
abc.example.com CNAME AWS_ELB-1

Now I wanted to create a new subdomain ( basically a sub-subdomain) which points to a different AWS ELB. Eg.
host1.abc.example.com CNAME AWS_ELB-2
host2.abc.example.com CNAME AWS_ELB-3

  1. Can I have entries like above ( CNAMEs for subdomain and sub-subdomain)?
  2. Do I need to have an A record for subdomain and have CNAMEs for sub-subdomains?
1
How are you going with this Dileep?mikey

1 Answers

0
votes

Official AWS recommendation is an A record:

http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-elb-load-balancer.html

This makes sense to me, as an A record is when you want to point a domain, subdomain, or even a sub-subdomain at a specific IP address.

CNAME is when you want to define a sub/sub-subdomain/domain that goes to another sub/sub-subdomain/domain. I use this when I want a subdomain that gets served by the same server from subdomain to TLD.

On the difference between A records and CNAMEs: