0
votes

By default, specific versions of an App Engine app are routed by URLs like https://[VERSION_ID]-dot-[SERVICE_ID]-dot-[MY_PROJECT_ID].appspot.com.

Is there any way to have something similar with a custom domain?

I currently have a subdomain mapping for my app configured with a CNAME DNS record pointing to ghs.googlehosted.com (my "naked" domain is not served by App Engine). This allows serving the default version of my app from that subdomain, but I also want to be able to test new versions of the app using my domain (for various reasons such as sharing cookies, etc.)

For example, let's say my domain is typeracer.com and my custom domain mapping in App Engine is data.typeracer.com: I want to be able to access a specific version of my app at a URL like https://[VERSION_ID].data.typeracer.com. Is there any way to do this?

I've looked at the App Engine docs for adding wildcard subdomain mappings and using a dispatch.yaml. However, it looks like that would work only for routing specific services, but not specific versions of the app.

1

1 Answers

2
votes

No, what you ask for exactly is not possible as the mapping is a (sub)domain per GAE service one, you cannot select a certain version of a service in the custom domain settings screen.

Sounds like may be attempting to implement different environments (say staging) based on service versions, which has some disadvantage, see Continuous integration/deployment/delivery on Google App Engine, too risky?

If so you can try to implement them using different services instead, which:

  • would allow you to map one (sub)domain per environment
  • you'd avoid all drawbacks mentioned in the above-mentioned Q&A

The domain naming scheme you mentioned suggests variable nesting levels, which in itself can be problematic, see Sub domain not listed in Google App Engine while enabling SSL for custom domains. Maybe try something like https://data-[VERSION_ID].typeracer.com instead of https://[VERSION_ID].data.typeracer.com?