Apex and Wildcard of multiple Route53 zones URL redirect

0

I apologize if this has been answered, but I cannot find it.

I have dozens of domains parked that need to be redirected to one URL. All are in Route 53.

Using route53, I can do this with an S3 bucket, but only for a specific FQDN.

However- if I want a wild card to the domain *.example.com to go to www.new-example.com, it doesn't work. For example: example.com -> Alias to S3 bucket named "example.com" redirects properly to www.new-example.com (as defined in the S3 bucket. xyz.example.com needs to have the same behavior without creating a new bucket specifically for it because I have no idea what could be used- thus, the wild card.

I have tried a CNAME for *.example.com and S3 gives me "NoSuchBucket" if I try to go to www.example.com.

I am using the built-in redirect in S3. If there is a rule or something that can be used in place of this, I am ok with that.

I need all FQDN for example.com to go to one place- a single S3 bucket - regardless of where they came from.

If there is another way to do this within AWS, I am open to it, but I need a simple setup.

This article keeps showing up and is not what I am wanting but seems to be what everyone thinks I want to do. It is not. https://aws.amazon.com/blogs/networking-and-content-delivery/hosting-internal-https-static-websites-with-alb-s3-and-privatelink/

*The destination URL is not in AWS and I do not have any control over it. The S3 bucket works great, with exceptions previously noted.

Thank you!

Jeff
已提問 1 個月前檢視次數 402 次
5 個答案
0
已接受的答案

I ended up adding an IP to an existing server to do the redirects. I appreciate all the ideas.

Jeff
已回答 1 個月前
0

Perhaps create a wildcard DNS record that points to S3 static website? Or a EC2 instance running Apache or Nginx? Configure the index.html page to do a javascript redirect?

Contents of the file could be as below

<html>
<body>
<script>
document.location="https://aws.amazon.com";
</script>
</body>
</html>
AWS
專家
Mike_L
已回答 1 個月前
  • this doesn't work. the NoSuchBucket problem still exists.

    (the index.html redirect does work)

    www.example.com -> CNAME to example.com where example.com is an A record with Alias on pointing to the S3 bucket

  • How about EC2 or Lightsail server instance?

  • I don't know what lightsail is. I also do not want more servers to keep track of. I'm not trying to be difficult; I need simple. More servers isn't simple...

    I like Route53, but it lacks the single feature that every other domain registrar has - wildcard redirects.

0

An easy way to do this is to setup an internet facing ALB and then have 1 default rule that performs a redirect.

Point all your domains to the ALB.

If using HTTPs you need to ensure you have a Cert applied to the HTTPs listener for each domain.

profile picture
專家
已回答 1 個月前
profile picture
專家
已審閱 1 個月前
0

Even though im an AWS advocate, if its something simple you need and do not want to spend a fortune/complicated setup. You could Transfer the domains to another Domain Provider such as FastHosts and use their Free WebForwarding features.

profile picture
專家
已回答 1 個月前
profile picture
專家
已審閱 1 個月前
  • I do not disagree. However, moving 89 domains is not exactly ideal.

    So basically, from those that have responded, my take away is - I can't do this.

    It would require another server with all the config that goes with it, or another AWS service. Route 53 and S3 cannot do it, short of creating an S3 bucket for every single possible permutation of every single domain we have.

    I appreciate everyone's input!

0

Hello, I haven't tested this, but I think it may work: https://serverfault.com/a/991291. Fronting S3 with CloudFront/ACM, in CloudFront you would add *.example.com as allowed CNAMEs, then use R53 Alias record to point xxxx.cloudfront.net to you *.example.com. Then, have an additional Route 53 CNAME record that points any *.example.com to your destination URL.

psp
已回答 1 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南