I'm trying to setup our Google App Engine to have 4 services hosted under a custom domain, one for the naked domain and three subdomains, such that:
site.com -> Service: default
app.site.com -> Service: app
api.site.com -> Service: api
admin.site.com -> Service: admin
According to the documentation How Requests are Routed and Mapping Custom Domains, we should simply be able to rely on Google App Engines own URL pattern SERVICE_ID.CUSTOM_DOMAIN
for the subdomains. We do not want to deal with a dispatch.yaml
file, since it shouldn't be necessary and it'll complicate our CI/CD.
We've configured the custom domain A, AAAA and CNAME records in the Google Cloud console and mirrored the DNS config in our domain registrar.
The site.com
naked domain correctly shows the default service, but the issue is that, so does all the other subdomains. They all just show the default service instead of the services they're supposed to. The services run just fine when using Google's appspot.com
url, but for the custom domain, they all just point to the default service.
Someone asked a similar question here a few of months ago, but in our case we've already configured the CNAME entries for each of the specific services.
What am I missing here?