I am in the process of trying to map custom domains to my app engine app. Basically what we are trying to do is white label our current service and allow external domains such as www.externaldomain.com to point to external domain.mydomain.com and serve the same content as mydomain.com. I recently learned that app engine has a 20 domain limit but since I am not actually creating sub domains for external domains and I will always be serving content from a wildcard subdomain will I don’t this this will be a problem.
So just to make this a little clearer, I want to do something like this:
external-domain-1.com (Serves) -> ext-dom-1.mydomain.com
external-domain-2.com (Serves) -> ext-dom-2.mydomain.com
We should be able to figure out the domain thats calling our website and change things such as logo, images etc. Am I correct? If not does anyone have any ideas on how we can still do this within the GCP environment without having to do a major shift, given we already have this set up on App Engine? I was also thinking that we may be able to use a wildcard subdomain to handle the external domains such as
external-domain-1.com (Serves) -> *.mydomain.com
Update:
I did find the article listed in the comments but I’m not sure if it helps https://cloud.google.com/load-balancing/docs/https/setting-up-https-serverless. If anyone has any experience doing this please feel free to chime in. Thanks.
I figured out how to do this using GCPs load balancer and a self signed certificate.
The steps I took to get this to work are as follows:
Follow the instructions from https://cloud.google.com/load-balancing/docs/https/setting-up-https-serverless
However when you go to set up the certificate your gonna need to use something such as Lets Encrypt to add both domain names to the certificate. Just as a POC, I created a certificate on my local laptop and uploaded it to the GCP load balancer. So, in order to move forward I am gonna have to create an endpoint that creates the certificate and verifies it when someone wants to point their domain at ours.
If anyone needs any additional help with this please feel free to reach out to me as it was a lot simpler than I thought.