Skip to main content

Possible to point ALL DNS resolution to a cname? [Resolved]

I have servers running in AWS Application Load Balancer. The AWS Load Balancer can only be connected to via an A-name (I.e. "prod-LB-us-west-2.elb.amazonaws.com"). A fun catch with AWS laod balancers is: the IP address will not remain consistent. It can (and does) change randomly. So I can't just point the A-record to the Load Balancer's IP.

The PM wants EVERYTHING hitting the domain to go to the correlated port on the Load Balancer: I.e.

example.com:3000 -> prod-LB-us-west-2.elb.amazonaws.com:3000
example.com:3001 -> prod-LB-us-west-2.elb.amazonaws.com:3001

Can this be done with a wildcard'ed cname?

If not, I'm not sure how to forward each name resolution to the Load Balancer.


Asked April 21, 2017
Posted Under: Network
50 views
1 Answers

Your tech lead is correct. I don't know what DNS provider you are using but you should be able to use a CNAME record that maps to the FQDN of the ELB. If you are using Route53 you could add an Aliased CNAME record to accomplish the same thing.

Using a CNAME record that maps to the FQDN of the ELB means that even if the IP Address of the ELB changes your connections will still work.

As far as the ports are concerned Thomas is correct this is not a DNS issue. What you need to do is to set up the appropriate listeners that forward requests to the correct target groups. AWS documentation is very useful and has all the configuration information that you need.

http://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html


Answered April 21, 2017
Your Answer
D:\Adnan\Candoerz\CandoProject\vQA