0

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.

JReado
  • 11
  • 1
  • Either of those `www.secondary.com` s3 bucket setups should have worked. If they didn't you need to look into that more. This sort of thing however: "CNAME routing www.secondary.com to secondary.com" is not going to work. In that setup Route53 is telling the web browser "this server over here hosting secondary.com also hosts www.secondary.com" but in reality it doesn't, so that just results in errors. You need a redirect sent to the browser, which requires an S3 bucket to be setup to send that redirect. You're confusing "forwarding" and "redirects", which are two separate things. – Mark B Mar 10 '22 at 20:56
  • @MarkB As far as terminology, you're absolutely right. This is not my field in any way shape or form, so my terminology is definitely lacking. The S3 solutions were my first attempt and I'm still confused why they didn't work. I've dealt with them in top level domains, so I assume there is something different required for subdomains? – JReado Mar 10 '22 at 21:06
  • There is nothing different required for subdomains. – Mark B Mar 10 '22 at 21:08

0 Answers0