Point your domain to a Lightsail load balancer
After you verify that you control the domain where you want to have encrypted (HTTPS) traffic, you need to add an address (A) record to your domain's DNS hosting provider that points your domain to your Lightsail load balancer. In this guide, we show you how to add the A record to a Lightsail DNS zone, and an Amazon Route 53 hosted zone.
Add an A record using the DNS zone - Assignments page
-
In the left navigation pane, choose Domains & DNS.
-
Choose the DNS zone you want to manage.
-
Choose the Assignments tab.
-
Choose Add assignment.
-
In the Select a domain name field, choose whether to use the domain name, or a subdomain of the domain.
-
In the Select a resource drop down, select the load balancer you want to assign the domain to.
-
Choose Assign.
Allow time for the change to propagate through the internet's DNS. This may take a few minutes to several hours.
Add an A record using the DNS zone - DNS records page
-
In the left navigation pane, choose Domains & DNS.
-
Choose the DNS zone you want to manage.
-
Choose the DNS records tab.
-
Complete one of the following steps depending on the current state of your DNS zone:
-
If you haven't added an A record, choose Add record.
-
If you previously added an A record, choose the edit icon next to the existing A record listed on the page, and then skip to step 5 of this procedure.
-
-
Choose A record in the Record type dropdown menu.
-
In the Record name text box, enter one of the following options:
-
Enter
@
to route traffic for the apex of your domain (e.g.,example.com
) to your load balancer. -
Enter
www
to route traffic for the www subdomain (e.g.,www.example.com
) to your load balancer.
-
-
In the Resolves to text box, choose the name of your Lightsail load balancer.
-
Choose the Save icon.
Allow time for the change to propagate through the internet's DNS. This may take a few minutes to several hours.
Add an A record in Route 53
-
Sign in to the Route 53 console
. -
In the navigation pane, choose Hosted zones.
-
Choose the hosted zone for the domain name that you want to use to route traffic to your load balancer.
-
Choose Create record.
The Quick create record page appears.
Note
If you see the Choose routing policy page, then choose Switch to quick create to switch to the quick create wizard before continuing with the following steps.
-
For Record name, type
www
if you plan to use thewww
subdomain (i.e.,www.example.com
) or leave it blank if you plan to use the apex of the domain (i.e.,example.com
). -
For Record type, choose A - Routes traffic to an IPv4 address and some AWS resources.
-
Choose the Alias toggle to enable alias records.
-
Choose the following options for Route traffic to:
-
For Choose endpoint, choose Alias to Application and Classic Load Balancer.
-
For Choose Region, choose the AWS Region in which you created your Lightsail load balancer.
-
For Choose load balancer, enter or paste the endpoint URL (i.e., DNS name) of your Lightsail load balancer.
-
-
For Routing Policy, choose Simple routing, and disable the Evaluate target health toggle.
Lightsail already performs health checks on your load balancer. For more information, see Health checks for your load balancer.
Your record should look like the following example.
-
Choose Create records to add the record to your hosted zone.
Note
Allow time for the change to propagate through the internet's DNS. This may take a few minutes to several hours.