Getting root to point to AWS ELB without using AWS nameservers
Solution 1:
Since AWS ELB's only offer DNS Record (Instead of IPs) you need to use a CNAME mapping. However with DNS, CNAMEs do not allow root domain to point to it. To overcome this AWS has provided Alias Records (Custom implementation to AWS) to point root domain to ELBs.
If your client want to use their nameservers still you can use, AWS Route53 in between to solve this with following steps.
- First create a Public Hosted Zone in Route53 for your domain.
- Then create a record set inside the Hosted Zone for the root domain to point to the ELB with Type = A - IPv4 Address, Alias = Yes with ELB CNAME as for the Alias value.
- In the external domain management service, create a NS record to point the root domain to Route53 nameservers.
Then when the DNS resolution happens, the root DNS query will first go to external nameservers(Managed outside of Route53) and then it will be forwarded to route53 where it will resolve the ELBs IP address and sent back.
Solution 2:
You can set up a machine with a single static IP address that does nothing but redirect requests to the www host. Then you can put an A record on the bare domain at the apex of the DNS zone pointing to that machine.
There is at least one service, http://wwwizer.com/naked-domain-redirect, that will do this for you. (I'm not affiliated with this service, but it appears to do what it claims and will serve your purpose. There are probably others like it.)
Ideally, though, you'd persuade your client to change the authoritative nameservers to point to a Route 53 hosted zone that you create for them. They are still the registrant and "owner" of their domain, and can take control back from you by simply changing the nameservers to something else.
I generally persuade clients with the explanation that our load balancer infrastructure is integrated with the DNS servers so that if a balancer node fails, or we need to add or scale up capacity, or experience a traffic surge or DDoS event, the load balancer system will automatically update the DNS records for their domain to try to mitigate the issue and keep the site up. To do otherwise is to do things in such a way that removes those layers of redundancy.