1 Answer
- Newest
- Most votes
- Most comments
0
To link a different domain to your AWS Lightsail instance, you'll need to configure DNS records properly. Here's how to do it:
If you're using Lightsail DNS zones:
- Sign in to the Lightsail console
- Go to the "Domains & DNS" tab
- Select the DNS zone for your domain
- Choose "Add record" in the DNS records section
- For the apex domain (example.com), create an A record:
- Select "A record" as the record type
- Leave the subdomain field empty (for apex domain) or enter your subdomain name
- In the "Resolves to" field, enter the static IP address of your Lightsail instance
- For subdomains (like www.example.com), create a CNAME record:
- Select "CNAME" as the record type
- Enter the subdomain name (e.g., "www")
- Point it to your domain or another subdomain
If you're using a Lightsail distribution with custom domains:
- Sign in to the Lightsail console
- Go to the "Networking" section
- Select your distribution
- Choose the "Custom domains" tab
- Click "Attach certificate" (you'll need to create an SSL/TLS certificate first if you don't have one)
- Select a valid certificate for your domain(s)
- Choose "Attach"
- After the status changes to "Enabled," click "Add domain assignment"
- Verify the information and choose "Add assignment"
Remember that DNS changes can take some time to propagate through the internet, sometimes up to 48 hours, though often much faster.
Sources
Point a domain to your Lightsail instance using Amazon Route 53 - Amazon Lightsail
how to add a subdomain to a LIghtsail instance | AWS re:Post
Serve content with custom domains for your Lightsail distribution - Amazon Lightsail
answered a year ago
Relevant content
asked 4 years ago
