AWS

AWS – Using Load Balancer for Your Domain

Do you want to have an AWS load balancer for your domain? This post shows how to point your domain to an AWS Load Balancer resource using two A Records, and we will use my domain name origdoc.com.

NOTE: doing this may incur charges to your billing account. Therefore, please shut down and delete ASW services and resources after trying them. The AWS services (and service features) we require are the following: ELB Load Balancer, EC2, Autoscaling, and public IP address, Route53.

Pre-configured AWS ELB Load Balancer

We will use a pre-configured AWS ELB Load Balancer that automatically scales out and scale in EC2 resources.

Register Your Domain

Before creating a Hosted Zone, register a domain name, e.g., example.com. It must be your domain you purchased from AWS or another domain name registrar like Namecheap. If you have a Namecheap domain and want to create a Hosted Zone, please go over Point your Namecheap domain to an EC2 instance via Route53.

Create Hosted Zone in AWS

Before we deal with A Records, we need to create a Hosted Zone is AWS.

Initial Records – NS and SOA

A newly created Hosted Zone has only NS and SOA records.

Next, we point www.origdoc.com and origdoc.com  to Load Balancer. We can also do this for others subdomains that we create. There are two ways to point our domain name to an AWS Load Balancer.

AWS Load Balancer and Hosted Zone Configuration 1

Create an A Record with an alias and point www.origdoc.com to the load balancer. Then, create another A Record with an alias for origdoc.com and point it to the first A Record created.

AWS Domain Load Balancer using A Records

AWS Load Balancer and Hosted Zone Configuration 2

Create A Records (with alias) for www.origdoc.com and origdoc.com

AWS Domain Load Balancer using A Records

For more information, please consult AWS documentation on Routing Traffic to an ELB Load Balancer.

Loading

Got comments or suggestions? We disabled the comments on this site to fight off spammers, but you can still contact us via our Facebook page!.


You Might Also Like