CloudFront distribution not showing as Route53 alias target
Solution 1
Combining several correct but incomplete answers:
- Only
A
records andAAAA
are supported. NotCNAME
records. - The Route53 "Alias Target" box matches against CloudFront distributions' "Alternate Domain Names" field. If you're creating a new record set for
something.example.com
, you should have already set the alternate domain name for one of your distributions tosomething.example.com
. - The Route53 Management Console can be slow, and it might not find your distribution right away — wait until the distribution status is
Deployed
.
Solution 2
Make sure you have set one or more Alternate Domain Names for you distribution, otherwise it won't be listed on the target combo for Route53 Alias.
As far as I understand, that's the same as configuring ServerAlias on your Apache's VirtualHost (or the correspondent for Nginx and so on). Without it, your requests wouldn't be identified as destined to that distribution when it gets there.
From AWS's documentation:
If you're using CloudFront to distribute your content, you can use Amazon Route 53 to route queries to your CloudFront distribution. The name of your Amazon Route 53 hosted zone (such as example.com) must match an alternate domain name in the CloudFront distribution. You cannot route queries to the CloudFront domain name for your distribution (such as d111111abcdef8.cloudfront.net). The following procedure assumes that you have already registered the applicable domain names.
Solution 3
Make sure it's an A record rather than a CNAME record (weird, I know). I found that buried in the documentation here:
http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-values-alias.html
Solution 4
If your distribution does not show as an alias target, you can always manually copy and paste the d123.cloudfront.net (replace d123.cloudfront.net with the actual DNS name of your distribution) in to the target. This will allow you to create the alias record.
Solution 5
Make sure your CloudFront distribution includes the name of your site (example.com )! I was having the same issue and spent well over an hour trying to solve the problem...
Related videos on Youtube
LDJ
Updated on November 09, 2020Comments
-
LDJ over 3 years
I’m trying to add a route 53 record set that points to my cloudfront distribution. However, when I select ‘create record set’ in route 53 and click the alias target in the subsequent panel, the cloud front distribution is not listed. All I get is ‘No targets available’. My Distribution has been created and is enabled (and is working). I have added a CName to my distribution with the same domain name that I’m setting up in Route53, but it still doesn’t show.
How do I get my distribution to show in the Alias Target field so that I can point a Route53 ‘a’ record to it?
Thanks
-
Michael - sqlbot almost 9 yearsThe console is notoriously sluggish about populating that box. Click into it, click away from it, click into it again seems like it might be the correct magical incantation. Did you wait until your Cloudfront distribution's status said "Deployed?"
-
boldnik about 5 yearsThis article describes it: the alternate domain name (CNAME) should be not empty to be visible in the dropdown for A-record alias.
-
qu1j0t3 almost 4 years@Michael-sqlbot I also had to refresh the Route53 page to see it.
-
CodeDoctorJL over 3 yearsi changed my cloudfront security policy to TLSv1.1_2016 and it resolve this issue for me
-
-
jelder about 8 yearsThe Route53 Management Console does not currently permit you to do this. You could make a CNAME instead, but it won't be an "alias" in the AWS sense.
-
imperalix about 8 yearsjelder, it worked and still works for me every time.
-
Moataz Elmasry almost 8 yearsTHIS IS THE CORRECT ANSWER
-
Dean Oakley over 7 yearsThanks, that fixed it for me.
-
Rudiger almost 7 yearsAlthough correct AWS should really fix up at the very least wording. In the distribution settings it asks to specify the CNAMEs however route 53 must be set to an A record for it to work.
-
Gobi Dasu almost 7 yearsCan you please link to the documentation?
-
Carsten over 6 yearsas of 10/2017: docs.aws.amazon.com/Route53/latest/DeveloperGuide/…
-
Herald Smit over 6 yearsThis works, as soon as you paste the CloudFront distribution URL in that box, AWS picks it up, and saves it. Thank you!
-
Mehran about 6 years
AAAA
also works, in fact it is recommended by the AWS doc (step 7): docs.aws.amazon.com/Route53/latest/DeveloperGuide/… -
bad robot almost 5 yearsthis was my issue
-
Sam Sehnert over 4 yearsAlso, a CloudFront distribution won't appear if it's status is
In Progress
. Wait until it'sDeployed
. -
dmitrybelyakov over 4 yearsThanks Andrew. This was very confusing.
-
Ajeesh Joshy almost 4 yearsThis worked for me while adding a wild card subdomain.
-
qu1j0t3 almost 4 yearsIt's amazing this is not better documented in the CF Distribution setup doc.
-
Andreas almost 3 yearsThanks, that helped!
-
Abdennour TOUMI almost 3 years😂 we become putting workarounds to some bugs :)
-
Abdennour TOUMI almost 3 yearsbut how come you are able to select regions for cloudfront ?? cloudfront is always in us-east-1
-
ErikE over 2 years@Mehran That's incorrect.
AAAA
records are for IPv6 IPs. -
Juan Rangel over 2 yearsThis worked for me. I had to add my domain to the alternate domain names. Thanks!
-
strangeMethod about 2 yearsThis was also my issue, thanks.
-
vargen_ about 2 yearsNumber 2 was missing for me, thanks!