40
votes

I have foo.com as a Hosted Zone with an A, NS, SOA, TXT and MX Record Sets. It works fine. Now I want a separate test.foo.com with an A entry but I want it in a separate Hosted Zone. Is it possible?

If I put an A record in foo.com's Hosted Zone with the value test.foo.com it works but I want it in a separate Hosted Zone.

I want it like so in order to have a clear separation between the test and prod. This way I can break the test but the prod is still up.

Thank you!

1

1 Answers

77
votes

Create a hosted zone for test.example.com.

Note the 4 name servers that Route 53 assigns to it the new hosted zone.

Back in the master zone, create a new resource record, with hostname "test" using record type NS, and enter the 4 name servers that Route 53 assigned, in the box below.

You just delegated the "test.example.com" subdomain, and any hosts and subdomains in it, to a different hosted zone, which you can now break to your heart's content, without impacting the production records.

The hosted zone for the subdomain can be in the same account or a different account.