I have one application running on AWS amplify and have a custom domain associated with the app. One of my use cases is to have a dynamic number of subdomains (per customer based) so I can have e1.example.com, e2.example.com, and so on.
But the problem is AWS amplify does not support wildcard subdomains and if I were to create subdomains programmatically, there is a limit of 50 subdomains.
So I thought of a workaround App 1 - Have a separate server with .htaccess file and wildcard subdomains App 2 - when any request comes with *.example.com it will redirect the request to newexample.com/e1 which is on AWS amplify.
Had a couple of questions around this
- Will this going to work as App 1 will be somewhere else and will only have a .htaccess file and nothing else.
- What could be the best place to have this redirector application? on AWS, which service can be the best fit, cost-wise too?