Posts: CDK Subdomain Hosted Zone
Configuring a subdomain hosted zone to support second-level subdomains
Today I needed to add a second-level subdomain in Route53. While the documentation exists, a clear block of code did not. In order to support more subdomains you must:
- Create a new hosted zone for the first-level subdomain (sub1.example.com)
- Note the nameservers in the new hosted zone
- Add an NS record to the root domain hosted zone (example.com) with a name of sub1 and the nameservers from the step above
- Add the new A or CNAME records to the new hosted zone to create a second-level subdomain (sub2.sub1.example.com)
|
|
Skipping the nameserver records will cause the subdomains to fail to resolve, and if you are deploying a certificate, validation will never complete!