By using AWS re:Post, you agree to the Terms of Use
/Lightsail CDN using Lighsail ALB Distribution with custom domain/

Lightsail CDN using Lighsail ALB Distribution with custom domain



I have the following infrastructure: LightSail CDN --- (distribuition) > Lightsail ALB --> Lightsail Servers

Everything works as expected except my custom domain from CDN which changes to Load Balancer DNS name once someone hits my custom DNS. For example: My domain is pointing to CDN DNS Name using approved certificate and enabled custom domain. So the network behaves like that: Mydomain ( -> Lighsail CDN ( -> Lighsail Load Balancer ( -> Lightsail Instances.

The problem is when I hit "". My web site is indeed loaded but the address changes to The consequence as you can expect is the browser complaning about certificate: the certificate is issued to and the URL address is

How can I prevent CDN change the address to the load balancer and keep my custom DNS instead?

2 Answers

Hi Jasinski,

I understand you access your website the address changes to “” and does not stay as the custom address ` You can prevent the change by creating an SSL/TLS certificate for your distribution, follow the documentation with the guided steps[1].


answered 20 days ago
  • Hi Lwazi, thanks by the answer. I already have ths SSL/TLS certificate ate my CDN. I think the issue is that my ALB is also SSL/TLS configured and probably this is changing the URL from my CDN custom domain.


The issue was that my ALB was SSL/TLS configured also. So once CDN was redirecting to ALB, the ALB also changed to enforce SSL. To solve this I've created a new load balancer withou SSL/TLS and redirected my CDN to this LB.

answered 20 days ago

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