1
votes

For our application we are using AWS Application Load Balancer (ALB) and have a listener for HTTP: 80 to forward traffic to the TargetGroup.

The way we have setup our application is that we will have a number subdomains and need to access these original subdomains (companyA.something.com) from within the application. Currently the application sees the DNS name of the ALB itself.

So far I have tried to setup the subdomain (in Route53) a couple ways:

  1. Created subdomain as A record with ALIAS pointing to the ALB DNS Name
  2. Created Hosted Zone for subdomain adding NS records for the subdomain to the zone file for the parent domain http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingNewSubdomain.html

I discovered that these are basically the same and the application still sees only the ALB DNS Name.

Is there anyway for me to get the original subdomain my users are going to without overriding with the ALB DNS name?

Thanks in advance, Aaron

1
It should already be working the way you need for it to. An ALB's hostname should only be visible to the application if that's also the hostname showing in your browser's address bar. You're not using anything not mentioned, like CloudFront (or Cloudflare), right?Michael - sqlbot

1 Answers

-1
votes

You need to check the HTTP HOST header. The framework you use should already be able to handle it for you.