title: How to bind one domain/subdomain per service in the Google App Engine?
body: <p>I have a lot of trouble finding how to map multiple domains to multiple services in the GAE. Here is the configuration :</p>
  
  <ul>
  <li>One application is a Go API, deployed in GAE in the standard environment</li>
  <li>The second application is an Angular application, also deployed in GAE in the standard environment but as another service.</li>
  </ul>
  
  <p>Here are the app.yaml files :</p>
  
  <p><strong>Go application app.yaml</strong></p>
  
  <pre><code>runtime: go
  api_version: go1.9
  
  handlers:
  - url: /.*
    script: _go_app
  </code></pre>
  
  <p><strong>Angular application app.yaml</strong></p>
  
  <pre><code>service: stage
  runtime: python27
  api_version: 1
  threadsafe: true
  
  skip_files:
  - ^(?!dist)  # Skip any files not in the dist folder
  
  handlers:
  # Routing for bundles to serve directly
  - url: /((?:inline|main|polyfills|styles|vendor)\.[a-z0-9]+\.bundle\.js)
    secure: always
    redirect_http_response_code: 301
    static_files: dist/\1
    upload: dist/.*
  
  # Routing for a prod styles.bundle.css to serve directly
  - url: /(styles\.[a-z0-9]+\.bundle\.css)
    secure: always
    redirect_http_response_code: 301
    static_files: dist/\1
    upload: dist/.*
  
  # Routing for typedoc, assets and favicon.ico to serve directly
  - url: /((?:assets|docs)/.*|favicon\.ico)
    secure: always
    redirect_http_response_code: 301
    static_files: dist/\1
    upload: dist/.*
  
  # Any other requests are routed to index.html for angular to handle so we don't need hash URLs
  - url: /.*
    secure: always
    redirect_http_response_code: 301
    static_files: dist/index.html
    upload: dist/index\.html
    http_headers:
        Strict-Transport-Security: max-age=31536000; includeSubDomains
        X-Frame-Options: DENY
  </code></pre>
  
  <p>I have a domain and want to bind the Go API to <strong>api.domain.com</strong> and the Angular app to <strong>domain.com</strong>.  </p>
  
  <p>By going to <em>App Engine > Settings > Custom Domains</em> I managed to add the domain for my API and it is perfectly working.<br>
  But now, I cannot find a way to map <strong>domain.com</strong> to my Angular application. Going to the same settings does not gives me an option to map a different service to my domain.  </p>
  
  <p>Thanks for the help and have a nice day !</p>