Route 53 Redirect Wildcard Subdomain to Apex

0

I registered and manage a domain with Route 53.
The domain will be used for a WordPress site hosted on LightSail.
Is there a way to redirect wildcard subdomains to the apex? *.Domain to Domain.com? I am able to forward wildcard subdomains, but the url in the browser doesn't redirect. I don't want the *. to remain in the url if I don't have a specific record for the subdomain.
I can't create a new hosted zone or NS record that has a wildcard.

Thank you very much for any help.

preguntada hace 2 años598 visualizaciones
1 Respuesta
1

Hi.

You can't implement a redirect mechanism with Route 53 alone.

You can create a wildcard subdomain record on Route 53, but specify the same name resolution destination as his Apex record. In other words, refer to Lightsail. (probably you already do this)

And with Lightsail there is no layer to redirect outside of your instance.
So you have to implement the redirect in your middleware.
If you have created a Bitnami Wordpress instance with Lightsail, you need to define a VirtualHost and redirect it with RewriteRule by referring to the following.

https://docs.bitnami.com/aws-templates/apps/wordpress/administration/redirect-custom-domains/

profile picture
EXPERTO
iwasa
respondido hace 2 años
profile pictureAWS
EXPERTO
Chris_G
revisado hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas