Does Google Compute Engine support sub-domains and if so, is there a limit?

Viewed 208

I'm considering building an SaaS application to be hosted on GCE (Google Compute Engine) where each user would get their own sub-domain when they sign up. For example

user_1.mydomain.com
user_2.mydomain.com
user_3.mydomain.com

Users will also be able to link a custom domain to their sub-domain i.e. instead of using user_1.mydomain.com, they could use mycustomdomain.com.

Is this possible in GCE? If so, is there a limit to the maximum number of sub-domains that can be supported? Any tips, information or links to documentation will be very much appreciated.

Thanks

1 Answers

The first part should be possible. Add a domain with a wildcard in Google Cloud Engine and use the following documentation to route the requests: https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed#routing_via_url

The second part is more complex. Every domain requires verification. The user should change DNS and add a record.

If you want add/verify programatically domains. You could do it commandline or create a process for it. See the following documentation: https://cloud.google.com/appengine/docs/standard/python/mapping-custom-domains

Hope you can do something with my answer

Related