I have a multi-tenant application that I've deployed to Elastic Beanstalk. Each tenant has a distinct sub-domain that they access the application from. After I deployed to Elastic Beanstalk I was able to access the application from the Elastic Beanstalk URL that was provided, but adding a sub-domain resulted in a 404.

The second thing I did was purchase a domain on Route 53 and set up a hosted zone to point to the application hosted on Elastic Beanstalk. I've read several sets of instructions on how to point a domain or sub-domain to an Elastic Beanstalk instance, but so far nothing has worked. Here's what I've tried:

  • Set up an A record for the domain to point to the elastic IP of the single Elastic Beanstalk instance.
  • Set up an A record for the sub-domain to point to the elastic IP of the single Elastic Beanstalk instance.
  • Set up a CNAME record for the sub-domain to point to the Elastic Beanstalk URL provided when I launched my application.
  • Set up a CNAME record for the sub-domain to point to the public DNS entry of the single Elastic Beanstalk instance.

enter image description here

Each time I try to access the application, the DNS will not resolve. I can ping my domain and it will resolve to an IP address that I don't recognize, but nothing else.

nslookup sub1.domainqa.com.


*** google-public-dns-a.google.com can't find admin.cscoastqa.com.: Non-existent domain

How do I point several sub-domain of a domain that resides on Route 53 to the same Elastic Beanstalk application?

  • 2
    Setting up a CNAME that points EB app's public domain name should work. and all the subdomains that points. are you sure you have tested correctly? also be sure that your app reads the http host header correctly. – risyasin Nov 30 '14 at 19:53
  • At this point it doesn't have anything to do with the app. The browser wont even resolve the domain or subdomain. – Sparafusile Nov 30 '14 at 20:58
  • 1
    well. that's weird. if it's not so special, just write down the subdomain. so we can check. or try these commands: for windows. nslookup my.subdomain.com or Posix systems dig my.subdomain.com @ – risyasin Nov 30 '14 at 23:13
  • The nslookup fails to find the domain. I have added a screenshot of my DNS settings (obfuscated but a good representation). Please let me know if you see anything amiss. – Sparafusile Dec 1 '14 at 19:14
  • if i am not wrong. your master domain is unreachable. nslookup cscoastqa.com. returns empty. so this means Route 53 service did not installed properly. NS addresses Name Server: NS-823.AWSDNS-38.NET Name Server: NS-60.AWSDNS-07.COM Name Server: NS-1452.AWSDNS-53.ORG Name Server: NS-1719.AWSDNS-22.CO.UK but screenshot is different. – risyasin Dec 2 '14 at 0:09

Turns out that problem I was having was due to the fact that I deleted my original hosted zone and created a new one. Different name servers were used in the new hosted zone than were assigned to my domain. To fix the issue I had to assign the name server that were set when I created the new hosted zone to the domain. After a short wait everything started working.

All three of my subdomains started working despite the fact that I set them up differently.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.