Redirecting requests in AWS for alternate names

59 Views Asked by At

I currently have a secondary domain (secondary.com) that I have a S3 bucket with static website hosting and a connected alias record that successfully forwards to my main domain (primary.com). I found that I had people attempting www.secondary.com and are not getting forwarded.

Things I've tried:

CNAME routing www.secondary.com to secondary.com

CNAME routing www.secondary.com to primary.com

Alias for www.secondary.com to the Alias record that routes secondary.com to primary.com

Creating a S3 bucket for www.secondary.com that redirects to primary.com with an alias for www.notprimary.com to that S3 bucket endpoint.

Creating a S3 bucket for www.secondary.com that redirects to secondary.com with an alias for www.secondary.com to that S3 bucket endpoint.

CNAME routing to both the endpoints of the S3 bucket attempts

Burning sage around the DNS settings

In RT53 an Alias record cannot go to a web address, only AWS resources or an IP4. Any help would be appreciated. I just don't understand why my S3 solution worked for the top of the domain, but not for the www variation. Thanks.

0

There are 0 best solutions below