Route 53 subdomain not working with CloudFront

0

Hi all,

I have setup a static website in S3 with HTTPS traffic routing to it via CloudFront.

Under Route 53, the website loads for A record example.com (alias to the CloudFront distribution).

However, I cannot create an alias for A record www.example.com - the CloudFront distribution alias isn't available from the list, "no resources found". I entered the CloudFront distribution value in manually.

I want all web traffic to go the single website, regardless if www is entered in the browser or not.

Create A record alias for CloudFront distribution

$ curl --head --location --dns-ipv4-addr 8.8.8.8 https://www.example.com
curl: (35) error:0A000410:SSL routines::sslv3 alert handshake failure

Thanks for any help!

Ash

Ash
질문됨 7달 전297회 조회
1개 답변
2
수락된 답변

To create an Alias record in Route 53 that points www.example.com to your CloudFront distribution, the domain name www.example.com must be included in the list of alternate domain names (CNAMEs) for the CloudFront distribution.

This can be found under the CF Distribution Settings:

    1. Click on the “Distribution Settings” button.

    2. Navigate to the “General” tab.

    3. Edit Alternate Domain Names (CNAMEs):

From the documentation

CloudFront distribution
Specify the domain name that CloudFront assigned when you created your distribution.

Your CloudFront distribution must include an alternate domain name that matches the name of the record. For example, if the name of the record is acme.example.com, your CloudFront distribution must include acme.example.com as one of the alternate domain names. For more information, see Using Alternate Domain Names (CNAMEs) in the Amazon CloudFront Developer Guide.

Link Here

AWS
답변함 7달 전
profile picture
전문가
검토됨 7달 전
  • Thanks! All working now.

    I created a new SSL certificate and updated the CloudFront distribution with both domain names. Both A record aliases added successfully.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠