AWS static website apex domain returns 403, www subdomain works fine

Viewed 208

I am creating a static website with AWS S3, CloudFront, Route 53, and AWS Certificate Manger. The www subdomain of my website (https://www.lnkrecall.org/) works fine, but the apex domain does not:

  • http://lnkrecall.org/ returns 403 ERROR The request could not be satisfied. and does not redirect to HTTPS as it should.
  • https://lnkrecall.org/ displays This site can’t provide a secure connection in Google Chrome

Configuration details:

  • The certificate I created in AWS Certificate Manager covers both lnkrecall.org and *.lnkrecall.org
  • In Route 53, there is one A record for each of lnkrecall.org and www.lnkrecall.org that both point to the same ...cloudfront.net. distribution
  • That distribution lists the www subdomain as a CNAME and has a Protocol Policy of Redirect HTTP to HTTPS

Evidently the apex domain is somehow configured differently from the subdomain, but I can't spot it

1 Answers

Based on the comments.

The issue was that apex domain was not added to CF distribution as an alternative name.

The solution was to add the domain to CF distribution.

Related