I have a central aws account with a public zone example.com
and two accounts for prod and dev environments. there are additional hosted zones in each of them for prod.example.com
and dev.example.com
.
Now i want to host a public webpage that is just accessible at example.com
without the prod
prefix. Where would i make the according entries?
2
Answers
A hosted zone for
prod.example.com
ordev.example.com
only has control of that specific subdomain. There is no way to create a record for theexample.com
root domain inside one of those subdomain hosted zones.If you want to create a record for a website at
example.com
you have to create that record in the rootexample.com
hosted zone.I’ve deployed a ReactJS webapp on AWS Amplify and its current domain is app.example.com. I’d like to provide functionality where users can specify their own subdomain (e.g., test1.example.com, test2.example.com) and have it automatically point to the same webapp. Essentially, all of these subdomains will be CNAME aliases of app.example.com.
To explain further:
A user specifies a subdomain name (e.g., "test1"). The system automatically sets up test1.example.com to point to app.example.com. Given that the main app is on AWS Amplify, how can I achieve this automatic subdomain creation and pointing?
Here’s what I’ve considered/attempted so far:
Manually adding CNAME records in Route53 for each subdomain. But I’m looking for a more automated solution.
I am using Nodejs and Reactjs
Any guidance, including potential AWS services or configurations, would be greatly appreciated!