It is really simple if, we do this with an s3 bucket.  In order to proceed, you must have enough privilege to create  "s3 bucket" and Route 53 edit access. Let 's see:

Step 1. Create an s3 bucket.

You need to create an s3 bucket with the domain name which you want to redirect to www. To create an s3 bucket, log into AWS console, goto services -> Amazon S3 -> Create bucket -> Create a bucket with the non-www domain name.

Step 2. Make the bucket as a Static website hosting with a redirect.

For this, go to bucket properties, choose the Static website hosting with redirect requests.

Add the www redirect there and save it.

Step 3. Edit AWS Route 53 entry for the non-www domain.

Go to AWS Route 53, select hosted domain, select the zone entry. From the right side, chose the setting as:

A – IPv4 Address -> Alias Yes -> Alias Target (Select the s3 bucket endpoint from the drop down).

Step 4. Save recordset.

That’s it!! Wait for the DNS propagation delay. You will be all set after the DNS propagation.

Was this answer helpful? 0 Users Found This Useful (0 Votes)