10

I'm trying to Redirect non-www requests to www on Amazon Route 53.

I made an S3 bucket with the name of the naked domain and configure the bucket properties to redirect from example.com to www.example.com, and then in Route 53 create an alias for the naked domain name that points to that S3 bucket based on the following :

Redirect non-www requests to www on Amazon Route 53

It worked great for me, except for the HTTPS.

Right now I can't access https://example.com for some reason.

Any help would be highly appreciated.

Eki Eqbal
  • 211

2 Answers2

4

Quite simply, you can't do what you are trying to do with S3, because the S3 web site endpoints offered by S3 do not support https.

DNS can't redirect web browsers, of course, so Amazon has a simple solution that leverages an S3 bucket with no content, and just a blanket redirect to another domain, as a helper mechanism to allow Route 53 to accomplish the task of redirecting the browser.

But the example.com → www.example.com redirection capability of S3 is http only.

4

You can put CloudFront in front of your s3 bucket and have CloudFront terminate the SSL connection. HTTPS is free when using SNI.

Steps:

  • create distribution and configure ssl, with the origin being your s3 website redirect bucket.
  • set the cname to be your naked domain
  • update route 53 to point to this distribution
imperalix
  • 346