Amazon Load Balancer and DynDNS

Yesterday I observed an interesting situation. Let’s take a look at the following use-case:

Let’s assume we have a web project hosted in Amazon Cloud. In Amazon, we do have a simple cluster with 2 nodes and the load balancer at the front. Next, we have a domain and we are using dyndns to manage dns records for our domain. Our goal is to point our domain to the load balancer.

Obviously, there is no issue if the load balancer has a fixed IP. We just have to create “A” record for the domain and put it to the IP address. According to Amazon, as the set of IP addresses associated with a LoadBalancer can change over time, you should never create the “A” record with any specific IP address. If you want to use a friendly DNS name for your LoadBalancer instead of the name generated by the Elastic Load Balancing service, you should create a CNAME record for the LoadBalancer DNS name, or use Amazon Route 53 to create a hosted zone.

Since we already use DynDNS, a way to jump to Amazon Route 53 is not a solution and fortunately, I was able to find a way to put a domain and the load balancer together.

1. In the DynDNS management panel, create the A (WebHop) Record for

2. Create the CNAME record for and point it to the A record of the load balancer. Btw, it was quite confusing for me, because Amazon gives the A record like an URL ( ).

That’s it. Now, when you type in browser you will be redirected to and the request will reach the load balancer subject to the CNAME for

P.S. I’ve read somewhere that Google doesn’t like any redirects (302), so I am not sure if the above approach is OK. Do you know a better way ?

Category: Amazon AWS


Leave a Reply

ERROR: si-captcha.php plugin: GD image support not detected in PHP!

Contact your web host and ask them to enable GD image support for PHP.

ERROR: si-captcha.php plugin: imagepng function not detected in PHP!

Contact your web host and ask them to enable imagepng for PHP.