1

I have setup two buckets on S3 one with www.mydomain.com and another with mydomain.com. All the files for my website are in the mydomain.com bucket.

On Route-53, I have made aliases from, (as suggested by answers to this question)

  1. www.mydomain.com to S3 endpoint.
  2. mydomain.com to S3 endpoint.

When I type mydomain.com, everything works fine and I see my website with mydomain.com in the URL. But using www.mydomain.com redirects to the s3 endpoint's naked URL, instead of the mydomain.com.

I also tried setting the following alias,

www.mydomain.com to mydomain.com

but that did not help either. What am I doing wrong?

Community
  • 1
  • 1
shyamupa
  • 1,528
  • 4
  • 16
  • 24

1 Answers1

1

You will have to setup a redirect www.mydomain.com bucket to mydomain.com bucket. Check below screenshot you need to enable that in your www.mydomain.com bucket.

enter image description here

Piyush Patil
  • 14,512
  • 6
  • 35
  • 54