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.

posta 2 anni fa598 visualizzazioni
1 Risposta
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
ESPERTO
iwasa
con risposta 2 anni fa
profile pictureAWS
ESPERTO
Chris_G
verificato 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande