google-app-enginedomain-mapping

Google App Engine Domain Mapping Issue Through CNAME


I have my base app hosted in GCP App Engine. The base domain for this app is app.xyz.com

I have user based subdomain dashboard access.

Eg. User 1 can have their subdomain xyz.pqr.com and then map it to my base domain app.xyz.com

User 2 can have their subdomain example2.com and then map it to my base domain app.xyz.com

I want the mapping to be done through CNAME only. i.e User have to change the cname to map with my base domain.

However while visiting these subdomain its landing me to google 404 page.

I want App engine to serve content to my base domain and all domain mapped to it.

In app engine, I have added *.xyz.com as domain mapping with traffic proxied through cloudflare using origin server ssl certificate.

Currently i can access the app through any subdomain like v1.xyz.com or v2.xyz.com buy not through v1.abc.com Which is currently mapped to app.xyz.com through cname

enter image description here

current ssl settings for Cloudflare in Full mode


Solution

  • Finally fixed it using a https load balancer:

    Backend -> App Engine Instance Frontend -> app.xyz.com

    v1.abc.com -> app.xyz.com via CNAME