1
votes

I have hosted a static website on AWS S3 with a custom domain (purchased from crazy domain). I have obtained SSL certificate from AWS ACM.

I need to redirect bare domain "example.com" to "https://www.example.com". Following are the steps I have followed so far -

  1. Created 2 buckets on S3 - example.com (Used for redirection) and www.example.com (Used for website hosting)
  2. Created 2 cloudfront distribution - One with "Origin Domain Name" as "example.com.s3.amazonaws.com" and another with another with "Origin Domain Name" as "www.example.com.s3-website-ap-southeast-2.amazonaws.c om"
  3. Created CNAME record set on crazy domain with WWW pointing to cloudfront distribution as

enter image description here

  1. Added "A" record set in Route53 for both cloudfront distributions.

When I enter example.com in Firefox and Safari, it is redirecting to https://www.example.com but in Chrome it is showing This site can’t be reached

Can anyone please let me know if there is anything specific I need to do for Chrome?

1
Have you tried in incognito window of chrome ? if its working other browser and not in chrome might be cache issue. You can see this stackoverflow.com/questions/37000416/… - aviboy2006
@aviboy2006 - Yes I have tried it in Incognito mode as well as in different computers but having same issue with all. You can check it at your end if you want tripsafe.co - Sachin Vairagi
CloudFront url is working in chrome ? - aviboy2006
Yes CloudFront URL is working properly and redirecting to www with HTTPS protocol - Sachin Vairagi

1 Answers

0
votes

Finally I have figure it out as -

  1. Added NS record set from Route53 to Crazy domain
  2. Removed CNAME record set with www
  3. Added Web Forward record set in crazy domain

enter image description here