How to map custom domain name for AWS Elastic Beanstalk | AWS Elastic Beanstalk Survival Guide
Point a custom domain to your Elastic Beanstalk environmentEvery 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
.
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.
- Login to your provider website and select your domain
- Click on "Advanced DNS"
- Create a CNAME record.
host: www
value: {{enter-your-subdomain}}.elasticbeanstalk.com. - Create a URL Redirect record.
host: @
value: http://www.{{your-custom-domain}}.com - Stand up and walk around your work desk for ten rounds. joking.. I know you will be multi-spamming the refresh button.
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
- Chapter 1: Introduction
- Chapter 2: Getting Started
- Chapter 3: How to deploy application on AWS Elastic Beanstalk
- Chapter 4: How to configure AWS Elastic Beanstalk to scale
- Chapter 5: How to map custom domain name for AWS Elastic Beanstalk
- Chapter 6: How to configure SSL for AWS Elastic Beanstalk
- Chapter 7: How to configure a Worker Environment for AWS Elastic Beanstalk