1

I have set up a wildcard subdomain for our project custom domain in app engine. The DNS CNAME has also been updated with the wildcard record. Our nameservers are with Cloudflare which supports wildcard CNAME.

However, when a subdomain is entered in the browser, I get a 404 from google. There are no other error messages so I have no idea what is causing this. Before cloudflare, we had our nameservers hosted with another company that uses cpanel and thesame issue was found so we are pretty sure there is a problem on the app engine side. Any ideas on what could be causing this? Doesn't the 404 error from google indicate that the wildcard record is getting resolved okay till it gets to ghs.googlehosted.com? The domain cname record is:

*.mydomain.ke CNAME ghs.googlehosted.com    

I expect that all subdomains that match the wildcard (for example test.mydomain.ke) will go to our main app. On the app engine side, there is only one service/version.

I have successfully gotten this to work before. But there were two differences the last time although I don't think these should make any difference:

  • The domain ended in .com instead of .ke.
  • The nameservers were with Godaddy instead of Cloudflare.
alexander.polomodov
  • 1,068
  • 3
  • 10
  • 14
bosst
  • 11
  • 2
  • Have you defined the actual routing in your dispatch.yaml file? (see https://cloud.google.com/appengine/docs/standard/python/reference/dispatch-yaml) If you don't have a test service, you need to explicitly route the test.mydomain.ke endpoint to your default service. – LundinCast Jul 04 '18 at 10:26
  • My understanding of the dispatch file is it is used for page mapping - not subdomain mapping. For example to route mydomain.ke/page1 to a location. Anyway, I have tried that with no luck... - url: "*.mydomain.ke" service: default – bosst Jul 04 '18 at 16:40
  • @bosst Were you able to solve this issue? – Ralemos Feb 04 '21 at 16:55

0 Answers0