5

Using the routing rules as mentioned here: Set up DNS based URL forwarding in Amazon Route53

<RoutingRules>
    <RoutingRule>
        <Redirect>
            <Protocol>https</Protocol>
            <HostName>dota2.becomethegamer.com</HostName>
            <HttpRedirectCode>301</HttpRedirectCode>
        </Redirect>
    </RoutingRule>
</RoutingRules>

I am able to see that http://becomethegamer.com properly redirect to https://dota2.becomethegamer.com but https://becomethegamer.com times out.

I thought it was the Protocol piece but realized that's the outbound rather than inbound.

This is in a bucked named becomethegamer.com and in Route 53 becomethegamer.com is an alias with the target as that bucket.

What could be causing https to not redirect?

Community
  • 1
  • 1
Matt
  • 5,547
  • 23
  • 82
  • 121

1 Answers1

7

No, it's this:

The website endpoints do not support https.

http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html

You can't redirect an https request without speaking https, and additionally, you need an SSL certificate that's valid for the hostname.

You can still do exactly what you're trying to do, but you'll need to use CloudFront in front and S3 in the back. Your S3 redirection configuration stays the same, but you'll create a CloudFront distribution, configure your domain name as an alternative domain name there, load your SSL cert into CloudFront, use the bucket-name.s3-website-xx-xxxx-xx.amazonaws.com web site endpoint (from the S3 console) as the Origin server, and point Route 53 to CloudFront instead of S3.

http://docs.aws.amazon.com/gettingstarted/latest/swh/getting-started-create-cfdist.html

Michael - sqlbot
  • 169,571
  • 25
  • 353
  • 427