0
votes

I have a web application running in Google App Engine right now under the default service for the GCP project. Let's say I own a domain domain.com which is registered and currently serves up a website on a locally managed server separate from Google Cloud.

I want to add the subdomain api.domain.com to point to the App Engine service but the method of registering custom domains in GCP doesn't really seem too friendly to this scenario. Perhaps I'm misunderstanding their documentation.

Is there a way for me to add a custom subdomain only in my App Engine project (api.domain.com) that points to my service, while the root domain.com points to a non-Google Cloud service?

1
api.domain.com is subdomain of domain.com, domain.com is subdomain of com... there really shoulld be no difference, perhaps you should just try and do it :) - Dusan Bajic
@DusanBajic I have tried it but even after following the instructions given by GCP for verifying the domain/subdomain, it never seems to propagate - m_callens
That will be difficult to troubleshoot further unless you provide real domain name... but maybe we can try if you provide screenshots of your DNS console - Dusan Bajic

1 Answers

1
votes

The console is a little confusing in this respect, but it can be done. You start here:

Console -> App Engine -> Settings -> Custom Domains -> Add a Custom Domain

The first step is to pick your domain and here you use the naked domain. You have to prove to Google that you own the domain, but you don't actually need to use the naked domain with Google. Many people don't use the naked domain and instead use www.mydomain.com.

The second step is to pick the subdomain that you want to map to your GAE service and you simply type this in the box.

You'll then set DNS records for A and AAAA for the subdomain so the subdomain maps to GAE.