Enabling custom domains for your Amazon Lightsail distributions
Last updated: December 29, 2022
Enable custom domains for your Amazon Lightsail distribution to use your registered domain
names with your distribution. Before you enable custom domains, your distribution accepts
traffic only for the default domain that is associated with your distribution when you first
create it (e.g.,
123456abcdef.cloudfront.net). When you enable custom domains, you
must choose the Lightsail SSL/TLS certificate that you created for the domains that you want
to use with your distribution. After you enable custom domains, your distribution accepts
traffic for all of the domains that are associated with the certificate that you chose.
Only one certificate can be in use at a time per distribution. If you disable custom domains on your distribution, your distribution is no longer able to handle HTTPS traffic for your registered domain until you enable custom domains again.
The domain names associated with the SSL/TLS certificate cannot be in use by another distribution across all Amazon Web Services (AWS) accounts, including distributions on the Amazon CloudFront service. You will be able to create the certificate for the domains, but you will not be able to use it with your distribution.
For more information about distributions, see Content delivery network distributions in Amazon Lightsail.
Before you get started, you need to create a Lightsail distribution. For more information, see Creating Amazon Lightsail distributions.
You also should have created and validated an SSL/TLS certificate for your distribution. For more information, see Creating SSL/TLS certificates for your Amazon Lightsail distribution and Validating SSL/TLS certificates for your Amazon Lightsail distribution.
Enable custom domains for your distribution
Complete the following procedure to enable custom domains for your distribution.
Sign in to the Lightsail console.
On the Lightsail home page, choose the Networking tab.
Choose the name of the distribution for which want to enable custom domains.
Choose the Custom domains tab on your distribution's management page.
Choose Attach certificate.
If you have no certificates, then you must first create and validate an SSL/TLS certificate for your domains, before you can attach it to your distribution. For more information, see Creating SSL/TLS certificates for your Amazon Lightsail distribution.
In the dropdown menu that appears, select a valid certificate for the domain(s) that you want to use with your distribution.
Verify the certificate information is correct, then choose Attach.
The distribution's Status will change to Updating. After the status changes to Enabled, the certificate's domain will appear in the Custom domains section.
Choose Add domain assignment to point the domain to your distribution.
Verify the certificate and DNS information are correct, then choose Add assignment. After a few moments, traffic for the domain that you selected will begin to be accepted by your distribution.
Here are some articles to help you manage distributions in Lightsail: