0

I'm trying to assign custom domain to App Engine module. At the moment I have staging.example.com pointed to app-id.appspot.com and that works correctly but I also want to assign api.staging.example.com to api.app-id.appspot.com. I've created CNAME record from api.staging.example.com to ghs.googlehosted.com, added api.staging.domain.com in developers console/appengine/settings/custom domains and here is my dispatch.yaml:

dispatch:
  - url: "staging.example.com/*"
    module: default
  - url: "api.staging.example.com/*"
    module: api

Any ideas what could be wrong? Every request to endpoints on api.staging.example.com shows only 404 error and I can't see this in the logs, it looks like api.staging.example.com is pointed to somewhere else, all request to api-app-id.appspot.com works correctly.

Harshal Patil
  • 6,284
  • 8
  • 37
  • 55
eshlox
  • 736
  • 1
  • 10
  • 21
  • Have you added and mapped the **http://api.staging.example.com** to **https://api-dot-app-id.appspot.com** in the Google App Admin Console ? – Ankur Jain Jul 31 '15 at 11:16
  • No, where can I do that? I don't see option for mapping domains in Google App Admin Console (https://admin.google.com?) – eshlox Jul 31 '15 at 13:56

2 Answers2

0

Are you making HTTPS requests? The official docs note that double-wildcard domains are not supported for SSL certificates.

Google recommends using the HTTPS protocol to send requests to your app. Google does not issue SSL certificates for double-wildcard domains hosted at appspot.com. Therefore with HTTPS you must use the string "-dot-" instead of "." to separate subdomains

So you'll need to replace the first . with -dot- to follow this pattern: https://module-dot-app-id.appspot.com. In your case api-dot-app-id.appspot.com.

sander
  • 91
  • 3
  • `https://api-dot-app-id.appspot.com` works correctly but I want to assign own subdomain (`http://api.staging.example.com`) to this module, maybe the problem is that I don't have SSL on api.staging.example.com? – eshlox Jul 31 '15 at 08:24
0

OK, I know where is my problem - Google Cloud Endpoints.

Google Cloud Endpoints does not support custom domains.

https://cloud.google.com/appengine/docs/python/endpoints/

https://code.google.com/p/googleappengine/issues/detail?id=9384

eshlox
  • 736
  • 1
  • 10
  • 21