Search code examples
google-app-enginegoogle-cloud-platformcustom-domain

How to configure custom domain for App Engine for service that is not the defautl in GCP?


I have one Node aplication runing on default App Engine service. Its was runing on "urlFromWebSite.appspot.com", and I config it to run in my domain url "customUrl.ai".

I built a second service with Node with name "second-service",and its runing at "service-two-doturlFromWebSite.appspot.com", but i want to run at "subDomain.customUrl.ai"

I tried dispatch.yaml file with the url that i want for 'second-service';

Stack post 1 talking about dipatch

Stack post 1 talking about dipatch

GCP explanation for dispatch

I have tried Custom domains in App Engine > Settings > Custom domains;

GCP documentation for mapping custom domains

At custom domains I config my subdomain url, and it generates the DNS. ´

enter image description here

I have question here: Where should I add this DNS config? At the "customUrl" or should i create a new record set for it?

I have been strugling with it for 2 days already, and could figure it out how to solve it. How should i config this to change my second service's url for a custom subdomain?


Solution

    1. When user enters customUrl.ai in a browser, traffic should be routed to Google's servers (for your GAE project). To do that, you configure DNS settings on your domain registrar's end.

    2. When user enters subDomain.customUrl.ai in a browser, traffic should be routed to Google's servers. To do that, you also configure DNS settings on your domain registrar's end.

    3. Both #1 & #2 are done for the same domain on your domain registrar's end (which is GoDaddy in your case). I believe this is what @JohnHanley is referring to. Put another way - just go to GoDaddy, find your domain and create entries corresponding to what GAE has outlined for you. If they are duplicates, GoDaddy will tell you.