AWS S3, Route 53, Cloudfront and ACM

28 Views Asked by At

I am trying to setup my static website using AWS S3, route 53, Cloud front and ACM. However, I am having issues removing the 'www' part. It's just meant to start with https://mywebsite.com and not https://www.mywebsite.com

The steps I took?:

  1. I setup the S3 bucket with public access enabled and added the correct policy.

  2. I created a hosted zone called www.mywebsite.com

3.I then created a new SSL cert in ACM and called it www.mywebsite.com. I created the records in route53 and updated Godaddy with the CNAME too. It was validated.

4.I then created a cloudfront distribution and selected the S3 bucket as the origin. In the default cache area, I selected 'REDIRECT TO HTTPS'. I selected the SSL cert created in step 3 and added in www.mywebsite.com as the alternative CNAME.

  1. I changed my GoDaddy NS to the ones hosted zone ones in route53. I also added the distribution URL to route 53 as an A record.

Following the steps above, I was able to access my website from my domain. However, it was with using the URL like this: https://www.mywebsite.com. I only wanted https://.

I restarted the above steps with just using mywebsite.com but that didn't even get passed step 3 with a pending verification.

Anyone got any clue what i am doing wrong?

0

There are 0 best solutions below