Apologies in advance as I'm trying to do something and I don't know what it's called or the best way to describe it, but here's my best attempt:
I have a domain, let's say aaa.com
, and that domain has a predefined subdomain for each customer that uses the system. Some examples of these subdomains would be: bbb.aaa.com
, ccc.aaa.com
, ddd.aaa.com
, etc. Each customer also has their own website that they maintain separately (i.e., bbb.com
, ccc.com
, ddd.com
, etc.).
What I'd like to do (but have no clue how to do) is point each of the customer's websites to their subdomain on my site without actually redirecting users.
For example, if a user goes to bbb.com
, without them knowing it and without them being redirected, they would be viewing bbb.aaa.com
. They would think that they are on bbb.com
the whole time, not some subdomain of aaa.com
. Similarly, if a user goes to bbb.com/eee
, then I would like them to actually see the content on bbb.aaa.com/eee
without being redirected.
I think I've seen this done before, so I'm assuming it's possible, but I'm not sure how this be done. I'm thinking that certain DNS records need to be added/modified on both the aaa.com
side and for all the customer sites as well to make it happen, but I'm not really sure how.
I'm using AWS and Apache for everything, but the customers use a mixed bag of domain providers, etc. What I'm really looking for is a high-level overview of how it works with some specifics on how to implement it from any domain provider. For example, "Add an A record on the aaa.com
side like this," etc. Thank you.