简体   繁体   中英

AWS LoadBalancer CNAME Hide

Is this possible to hide the AWS classic/Application Load-balancer CNAME ?

I have a domain name mapped to the AWS Classic load-balancer. When I did dig the domain name using host command it is showing the loadbalancertype.amazonaws.com(CNAME) .

I want to hide/remove the CNAME of the load-balancer.

Why do you use CNAME entries? You could use A Record Alias and then select your load-balancer as target. It also does reduce your cost for Route53.

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

Then you will have ip addresses in your dig top level statement. However, if you go deeper by doing host ip-address you will get the domain ec2-...compute.amazonaws.com returned.

airbnb.com does it like that for example.

AWS classic/Application Loadbalancer provides DNS name because it can scale up and scale down and you don't need to take care of adding IP addresses to your record. If you're using DNS service other then Route53 or CloudFlare , you don't have any option other then publishing CNAME record. In Route53, you have Alias record which can achieve your task but you need to use Route53 Nameservers for that, There is no problem in using CNAME Records, if you want no one can access our website using ELB DNS Name, you can have WAF rule to block based on HOST header.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM