1

In Aws I am creating A ELB(Elastic Load Balancer ) for handling load over instances . my question is in previous we are use single instance and add this instance with an elastic ip . with this elastic IP we are pointed a multiple domain and subdomain in our domain provide account (in siteground ). Now how I point all domain and subdomian with ELB . Our ELB name is LAMPLB-xxxxxx.eu-west-1.elb.amazonaws.com

1 Answer 1

1

If the domains are subdomains (e.g. mysite.example.com) then what you need in DNS is a CNAME record. The target of the record will be the ELB hostname.

mysite IN CNAME elb-hostname....amazonaws.com.

If the site is not a subdomain, but instead is a zone apex (e.g. example.com itself) then a CNAME record will not work, here. Instead, you need an ALIAS record, which requires that your DNS be hosted in Route 53.

Alias records were designed as a solution to what is otherwise a limitation of the way DNS works. At the top (apex, root) of a given domain, it's not possible for a standards-compliant DNS server to return a different name, the way CNAME does for hosts within a domain.

Since Route 53 has "internal" knowledge of the current RRs for the ELB, it uses that information to answer queries directly.

Route 53 responds to each request with one or more IP addresses for the load balancer

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

Note that you can use ALIAS records at the subdomain level, too... but they are only required when you're not working with a subdomain.

2
  • As an addendum, if you want a free DNS provider that supports ALIAS records at the zone apex, check out CloudFlare. You have the option to use it for DNS only and not as a CDN. Jul 20, 2015 at 0:38
  • Cloudflare apparently calls it CNAME Flattening. Note that this setup uses a back-end query to resolve the address, so it's still RFC compliant. Assuming it does not cache responses from the back-end query for an improper length of time, this appears to be a viable alternative. Jul 20, 2015 at 1:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.