1
votes

I'm trying to get a subdomain to resolve to my AWS server (sub.example.com), while the example.com domain needs to resolve to another server (Wix).

Currently, the NS on my host site redirects example.com to Amazon's Route53 DNS:

ns-1.awsdns-5.org.
ns-2.awsdns-6.co.uk.
ns-3.awsdns-7.net.
ns-4.awsdns-8.com.

On Route53 I have set two different hosted zones, one for sub.example.com where I have the same NS setup and one for example.com where the NS redirects to Wix:

ns1.wixdns.net
ns2.wixdns.net

When I try to access the different domains, sub.example.com works as expected but example.com cannot be resolved.

I have also tried to set the same zone host for the both of the domains by adding to example.com a NS specific to the subdomain with the addresses shown above, to no avail.

What am I doing wrong here?

1
Note - for technical reasons relating to my domain host, I cannot set only the subdomain's NS to Amazon's DNS or I would have done that. This is obviously the right solution to begin with. - Mor Blau
The right solution is keeping your NS at one place only, and add appropriate A/AAAA/CNAME records for subdomains - hjpotter92
If at Wix you have only web/app server, there is no need to have NS records pointed there - Dusan Bajic
I need the subdomain to link to my load balancer, which doesn't have a static IP or CNAME. Route53 solves this problem by linking the subdomain using an alias to my ELB. If you know of a different way to do this, I'll be more than happy to try that :) - Mor Blau

1 Answers

3
votes

Based on your comment, if you only want the subdomain to handle requests routed to the load balancer; simply create a CNAME record in your DNS provider zone:

sub.domain.com.        3599    IN      CNAME   your-load-balancer-123456789.us-west-2.elb.amazonaws.com.