How to point your Namecheap/GoDaddy Domain to an AWS Load Balancer

Montana Wong
2 min readJan 23, 2020

If you’ve ever build a web service on AWS before, you know that the out-the-box domain names are quite ugly and not human friendly.

AWS default DNS names aren’t pretty.

Luckily, it’s really easy to set up your domain (www.example.com) or subdomain (api.example.com) to use instead of Amazon’s.

Register a Domain with a Domain Registrar

Firstly, register your domain through a domain registrar like GoDaddy or NameCheap or take one that you already own.

Once you have your domain, go to the advanced DNS tab or wherever you can configure custom A-Records/CNAMES/etc in your registrar’s website.

Advanced DNS on Namecheap

Add a new CNAME record for your domain.

  1. Under Type select “CNAME”. Under “Host” put whatever subdomain you want to have point to your Load Balancer. For example, if your domain is www.example.com, and you want your API to be behind api.example.com, put “api” in this field. Similarly, if you wanted www.example.com to point to your API, you would put “www” in this section. Some domain registrars require you to put the entire path in this field, so check their documentation.
  2. Under “Value”” put the DNS name of your load balancer. xxx-<aws-region>.elb.amazonaws.com.
  3. Save your new CNAME entry.

Viola! Your domain/subdomain should now be pointing to your AWS Load Balancer. If it doesn’t immediately work, you may need to wait up to several hours for the domain CNAME changes to reflect.

If you enjoyed this post, don’t forget to clap! You can follow me on Twitter at @Montana_Wong

--

--

Montana Wong

I write about ideas, startups, and convergence of tech.