CloudFront for naked domain name WordPress problem

0

I have created a WordPress website (mywebsite.com) and wanted to use CloudFront. In the wizard, it asked me to add the below CNAME record in my DNS records.

Name               Type     Value
mywebsite.com      CNAME    xxx123.cloudfront.net

But when I tried to enter that in my DNS records I got an error that it is not allowed. What is your solution for this?

Note: I even tested this with Route 53 and got a similar error:

(InvalidChangeBatch 400: RRSet of type CNAME with DNS name mywebsite.com. is not permitted at apex in zone mywebsite.com.)

asked 2 years ago634 views
1 Answer
2
Accepted Answer
profile pictureAWS
EXPERT
kentrad
answered 2 years ago
profile pictureAWS
EXPERT
reviewed 2 years ago
  • You mean I have to create A records to IP4 and IP6? Does this defeat the purpose of having dynamic IP addresses to the various regions?

  • Alias records are route53-specific extensions to DNS functionality. They are not the same as A records. You can find more information here: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-choosing-alias-non-alias.html

    You cannot use a CNAME for the zone apex. Alias records provide you similar functionality to CNAME records when used with CloudFront distributions, plus they can be used for the zone apex. If you create any alternate domain names though, eg. www.example.com, you should use a CNAME record.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions