title: AWS - Have https endpoints for both www and non-www endpoints using Route53, ACM, Cloudfront
body: <p>I have a static webpage on AWS S3 with Cloudfront. Cloudfront is setup with ACM (AWS Certificate Manager) and am using Route 53 with it. How can I have both the <code>www.my-endpoint.com</code> and <code>my-endpoint.com</code> endpoints secure with <code>https</code>?</p>
  
  <p>Here are some details:</p>
  
  <ul>
  <li>My ACM certificate is setup for just <code>my-endpoint.com</code> and is attached to the Cloudfront distribution</li>
  <li>I have a Cloudfront A Records for <code>my-endpoint.com</code> whose alias points to Cloudfront</li>
  <li>My <code>www.my-endpoint.com</code> is configured so its alias is <code>my-endpoint.com</code></li>
  </ul>
  
  <p>When I navigate to <code>https://www.my-endpoint.com</code> chrome complains of a potential security risk whereas the <code>https://my-endpoint.com</code> is fine.</p>