How to map custom domain name for AWS Elastic Beanstalk | AWS Elastic Beanstalk Survival Guide

Point a custom domain to your Elastic Beanstalk environment
July 21, 2016

Every environment that you setup has a *.elasticbeanstalk.com subdomain assigned. However, in production environment, you will want to have a custom domain pointing to it. So instead of http://helloeb-production.ap-southeastasia.elasticbeanstalk.com, you can get it to point from http://www.helloeb.com.

Colin Toh

Amazon Route 53

If you bought your domain via Amazon Route 53, you can skip the entire article. Just scoot over to this lovely article written by Amazon themselves: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customdomains.html

External Domain Provider

But if you bought the domain off providers like namecheap, godaddy, etc., follow the steps below:

Take note: Depending on your providers, the terminology can be different but the general steps are still the same. The following steps assume you are using namecheap.

  1. Login to your provider website and select your domain
  2. Click on "Advanced DNS"
  3. Create a CNAME record.
    host: www
    value: {{enter-your-subdomain}}.elasticbeanstalk.com.
  4. Create a URL Redirect record.
    host: @
    value: http://www.{{your-custom-domain}}.com
  5. Stand up and walk around your work desk for ten rounds. joking.. I know you will be multi-spamming the refresh button.
Colin Toh My DNS settings

Give it 5 - 10 mins. The custom domain should now point to your production environment!

Interested in this AWS Elastic Beanstalk Survival Guide Series, remember to subscribe below for updates


Elastic Beanstalk Survival Guide: Table Of Content

RSS