Cannot add default distribution domain as "A" DNS record for Lightsail

0

Hi there!

I setup a Distribution for Lightsail instance. The doc says I should add/edit "A" DNS Record for the main domain with RESOLVE TO = default domain for this distribution (e.g. bca0lvt.cloudfront.net).

Question!

AWS Lightsail DNS zone only allows IP Address for "A" DNS Record fro RESOLVE TO field. So how should I insert bca0lvt.cloudfront.net as value? I don't want to ping the IP address of default domain for distribution, because it's different, it would not be correct. What is the correct way to do this?

Thanks a lot!

2 Answers
0
Accepted Answer

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:

Enter image description here

profile picture
TomCC
answered a year ago
profile picture
EXPERT
reviewed a month 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
profile picture
EXPERT
answered a year 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

    Choose an address (A) record to point an apex domain (e.g., example.com) to your distribution.

    If an A record for the apex of your domain is already present in your DNS zone, then you will need to edit that existing record instead of adding another A record.

    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

    1. 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.

    2. 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. Enter image description here

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