I have a static web site on an s3 bucket. the domain address is example.com and works fine.
Now I want to route all traffic to www.example to the same bucket with a 301 redirect.
For this I have done the following:
I have set up a bucket, that directs all traffic to the other bucket (I entered the full endpoint url with example.com.s3-website.eu-central-1.awsamazon.com)
I have set up a cloudfront distribution for www.example.com, which has the bucket for the www.example.com (which only redirects all traffic to the bucket of example.com). I have entered the alternate domain name as www.example.com
I have set up a route 53 entry for www.example.com A record that points to cloudfront distribution of www.example.com.
The problem that I have is, the redirection works fine, but the naked endpoint url is displayed after redirect on the address bar of the browser. I want it to display www.example.com
The actual address is prochoice.com.tr
Thank you in advance for all help.