If your app is running on AWS Elastic Beanstalk and your domain still points at a sad old parked page you deserve better. This guide walks through mapping a domain in Route 53 to your Beanstalk environment using Alias records for the apex and CNAME entries for subdomains. No magic spells required just a few clicks and some mild impatience while DNS does its thing.
Get these ducks in a row before you touch DNS
Short version first for the impatient types
Open the Route 53 hosted zone for your domain and copy the name servers listed there. Go to your registrar and make sure those name servers are set. If the registrar still points at another DNS provider the domain will behave like that provider owns it, which is not the mood you want.
In the Elastic Beanstalk console note the environment CNAME such as myapp-env.elasticbeanstalk.com. If your environment uses an Application Load Balancer use the ALB DNS name as the Alias target. Route 53 can alias directly to AWS resources and that avoids extra DNS hops and surprises.
Create an A record for the root domain with Alias enabled and point it at the load balancer. This gets around the classic restriction that you cannot create a CNAME at the apex. During setup use a modest TTL to speed testing and updates.
Add a CNAME record for the www subdomain that targets the Beanstalk environment CNAME. If you put a CDN in front of your app then point both the apex Alias and the www entry at the CDN instead. That is the standard setup for most production architectures.
DNS changes can be annoyingly patient. Use commands such as dig example.com +short
and dig www.example.com +short
or nslookup
to confirm resolution. If things do not match your expected targets check TTL values and name server settings at the registrar. Small TTLs help during testing and then increase the TTL once everything is stable.
Mapping Route 53 to Elastic Beanstalk is mostly administrative muscle memory. Use Alias records for the apex and CNAME for subdomains, point to the ALB when you have one, and verify with dig or nslookup. Lower TTL while testing and then raise it when you are confident. Now go sip something celebratory while the internet slowly agrees with you.
I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!
This is a dedicated watch page for a single video.