2 Answers
- Newest
- Most votes
- Most comments
0
Thanks Riku_Kobayashi, It doesn't work for me. I think it's the region issue (Virginia (us-east-1)), maybe not.
I finally found the right place to set distribution to a Lightsail DNS. You don't need to edit DNS records, you should go Lightsail Home > Domains & DNS > Select your domain > Assignments Tab and assign the distribution to the domain like this:
answered a year ago
0
Use CNAME records.
https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-point-domain-to-distribution
Choose a canonical name (CNAME) to point a sub domain, such as website.example.com, to your distribution.
For example, if you use the domain "hogehoge.com", do as follows.
hogehoge.com cname bca0lvt.cloudfront.net
Relevant content
- Accepted Answerasked a year ago
- asked a year ago
- Accepted Answerasked a year ago
- asked 3 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
Thank you for the answer, It doesn't allow me to create CNAME record for the root domain. CNAME is only for subdomains. I need the AWS Distribution for the root domain. The doc you're referring says it should be added a "A" record. And here is the issue, "A" record only accept IP Addresses. i cannot insert "bca0lvt.cloudfront.net"
DOC: Choose an address (A) record to point an apex domain (e.g., example.com) to your distribution.
Alias records can be set in Lightsail's DNS zone. You would be able to select the distribution you created when setting up the A record. https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-create-dns-entry
The documentation is confusing, but I think this means that the IP address is not registered here, but rather the distribution is selected.
I'm sorry but I didn't follow you.
I have two "A" records:
My distribution URL is: d2f2gxbbca0lvt.cloudfront.net
I tried these, and it doesn't allow me to set as "A": example.com d2f2gxbbca0lvt.cloudfront.net ERROR: Input error: The format of the target is not a valid IPv4 address: d2f2gxbbca0lvt.cloudfront.net.
I tried these, and it doesn't allow me to set as "CNAME" either: example.com d2f2gxbbca0lvt.cloudfront.net ERROR: Domain labels (strings separated by the '.' delimiter) must be between 1 and 63 characters in length
It is frustrating that we cannot operate while looking at your screen, but you should be able to set up an alias record (A record). Under "Resolves to" you should be able to select a distribution.
This image is in Japanese, but you can select the distribution as follows.