Creating a sub-subdomain on AWS Route 53

Viewed 2960

I'm trying to set up a a domain for our staging environment which mirrors the domain structure of our production environment. For example:

puppet.example.com         # production
puppet.staging.example.com # staging

I have a hosted zone for example.com where I have the puppet subdomain working fine. I've also created a hosted zone for staging.example.com and created a record for the puppet subdomain within that, but I can't get it working.

When I use nslookup on puppet.staging.example.com the IP address that appears isn't the address I've configured on Route 53.

Do I need to do something different when setting up a hosted zone for a sub domain?

2 Answers

To host both puppet.example.com and puppet.staging.example.com using AWS Route53, you would only need to create one hosted zone:

example.com

Once you create the hosted-zone, you would create two "record sets", one for each sub-domain. Since you want the names to be equivalent, their type and value should match (i.e., the A record or CNAME record should be the same).

You don't need to do anything special about "sub-subdomains," just include a dot (.) in the name. For example:

Name            Type    Value
puppet          A       1.2.3.4
puppet.staging  A       1.2.3.4
Related