Search code examples
amazon-web-servicesdnssubdomainamazon-route53

AWS Route53 - delegate subdomain


I created two public hosted zones in AWS Route53:

  • domain.com
  • sub.domain.com

In "sub.domain.com" zone I added "A" record for "test.sub.domain.com" name resolved to 10.0.1.5. I can resolve "test.sub.domain.com" name using "sub.domain.com" name servers.

> nslookup test.sub.domain.com <sub.domain.com server>

Name:    test.sub.domain.com
Address:  10.0.1.5

Following instruction for Creating a Subdomain That Uses Amazon Route 53 as the DNS Service, in "domain.com" zone I added "NS" record for "sub.domain.com" pointed to the "sub.domain.com" zone name servers. Now, when I try to resolve "test.sub.domain.com" name using "domain.com" zone name servers, I get response that name is served by "sub.domain.com" servers, but it cannot resolve to IP address. Below is example of "nslookup" response:

> nslookup test.sub.domain.com <domain.com server>
Name:    test.sub.domain.com
Served by:
- <sub.domain.com server>

          sub.domain.com

Does Route53 support subdomain delegation to other Route53 servers? Have I missed something in the configuration?


Solution

  • What you are describing is how DNS works. Recursive name servers would follow the name server referral and ask the name servers for sub.domain.com to resolve test.sub.domain.com.

    You can try this out by doing a dig +trace test.sub.domain.com, assuming your are delegating domain.com to the route 53 you configured in the .com zone.