‹ Return to How tos

Enabling custom domains for your Amazon Lightsail distributions

Last updated: November 1, 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.

Important

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.

Prerequisites

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.

  1. Sign in to the Lightsail console.

  2. On the Lightsail home page, choose the Networking tab.

  3. Choose the name of the distribution for which want to enable custom domains.

  4. Choose the Custom domains tab on your distribution's management page.

  5. Choose Attach certificate.

    If you have no certificates, then you must first create an SSL/TLS certificate for your domains, and then validate it, before you can attach it to your distribution. For more information, see Creating SSL/TLS certificates for your Amazon Lightsail distribution.

  6. In the dropdown menu that appears, select a valid certificate for the domain(s) that you want to use with your distribution.

  7. Verify the certificate information is correct, then choose Attach.

  8. Add a domain assignment to the DNS of your domain to point the domain to your distribution.

    The distribution's Status will change to Updating. After the status changes to Ready, the certificate's domain will appear in the Custom domains section. Choose Add domain assignment to point the domain to your distribution.

  9. Choose Add assignment. After a few moments, traffic for the domain that you selected will begin to be accepted by your distribution.

  10. Choose Save.

    Your request to enable custom domains is submitted, and the status of your distribution is changed to In progress. After a while, the status of your distribution changes to Enabled.

Additional information

Here are some articles to help you manage distributions in Lightsail: