How redirect non WWW to WWW with Amazon Cloud front, Route 53 and S3

December 5th, 2015
Print Friendly, PDF & Email


Route53_0

Many people used AWS, want redirect non-www to www for avoiding duplicate content.
Following the steps below will resolve your problem:

Step 1: Go to S3 Service and Create a new bucket with the name mysite.com and enable StaticWebhosting. Then
Select Redirect all requests to another host name and type www.mysite.com.
step1

step2

Step 2: Go to CloudFront and create new Dist and in origin put endpoint of S3 bucket we created in pervious
Step and in CNAME writes mysite.com and Click Create Distribution.

step3

step4

Step 3: go to Route 53 and add New A record mysite.com (not need to add any prefix) and select Alias yes
And put CloudFront endpoint URL we created in step 2 example (xyz.cloudfront.net).

step5

After the DNS changes, if you try mysite.com it should redirect to www.mysite.com.

Reza Mousavi

Reza Mousavi

Serial Entrepreneur, Founder & CEO at PBXDom, Software Architect, Frequent reader, Fan of adventure travel
Reza Mousavi
Print Friendly, PDF & Email

Share this article on social networks:


Related Posts


Leave a Reply

Guess less and know more

Try PBXDOM for 14 days free
no credit card required.


Try free for 14 days