I have a domain called example.com
which has around 20 subdomains, for instance subdomain_1.example.com
, subdomain_2.example.com
, etc.
I am changing my domain from example.com
to newdomain.com
. Furthermore, I did the set up of all subdomains on Route 53, now both domains are loading my website, I would like to redirect all the traffic from old subdomains to new subdomains. For instance, if a user requests for subdomain_15.example.com
should be redirected to subdomain_15.newdomain.com
.
I read the solution provided by AWS regarding a S3 bucket per route, but I have a lot of subdomains, and I am wondering if there is a more efficient way to create the redirect rule for all domain and subdomains at once.
You need compute for this, if you do not want to use S3's built-in HTTP server/endpoint with its redirect capability.
There are quite a few options:
You didn't tell, what system is actually serving your domain, so another option might also be to just configure your webserver (if any) to serve the HTTP redirect response from within your application (if any).