1
votes

I have a skeleton Google App Engine running on the URL provided by GAE in the format of "myproject.appspot.com". I have two services - one running a backend Node/Express server, and another for a React front-end. The backend service has url "api-dot-myproject.appspot.com" and the front end "client-dot-myproject.appspot.com". I have independently deployed each service along with the root-level dispatch.yaml, and have gotten these GAE-provided urls to work. When I go to the URLs provided by Google, my deployed services work as intended. However, I've also tried used a custom domain from Google Domains which is causing me trouble. I've followed the instructionss provided by Google - I first bought the domain from Google, then added it to Google App Engine. My GAE app then provided me with A, AAAA, and CNAME records to add to my Google Domains "Custom resource records" which I did.

Domains

I then waited over 24 hours before trying to access mydomain.app (the domain name I purchased). However, attempting to access the page results in a 404 error.

404

I've been trying to figure this out for a while now, and I've searched through every previous stackoverflow question on this topic but wasn't able to resolve it. Any help would be greatly appreciated.

dispatch.yaml:

dispatch:
  - url: "*client-dot-myproject.appspot.com/*"
    service: client
  - url: "*mydomain.app/*"
    service: client
  - url: "*api-dot-myproject.appspot.com/*"
    service: api
  - url: "*/*"
    service: client

api.yaml

runtime: nodejs12
service: api

handlers:
  - url: /api/
    script: auto
  - url: /
    script: auto

client.yaml

runtime: nodejs12
service: client

handlers:
  - url: /static/js/(.*)
    static_files: build/static/js/\1
    upload: build/static/js/(.*)
  - url: /static/css/(.*)
    static_files: build/static/css/\1
    upload: build/static/css/(.*)
  - url: /static/media/(.*)
    static_files: build/static/media/\1
    upload: build/static/media/(.*)
  - url: /(.*\.(json|ico|png))$
    static_files: build/\1
    upload: build/.*\.(json|ico|png)$
  - url: /
    static_files: build/index.html
    upload: build/index.html
    http_headers:
      Access-Control-Allow-Origin: "*"
  - url: /.*
    static_files: build/index.html
    upload: build/index.html
    http_headers:
      Access-Control-Allow-Origin: "*"
1
Could you confirm if you followed the documentation regarding "Mapping Custom Domains"? If not, please make sure that all the steps stated in the doc. Also, please remember that you can check if you DNS records have been updated using a dig tool, as mentioned in the same doc. - tzovourn
Hi, I did follow the dcoumentation there exactly. Using the dig tool in the article, it does look like the DNS records have been added. Queying the base "mydomain.app" url shows the A record that I added to my domain's DNS record. Querying "www.mydomain.app" also returns the ghs.googlehosted.com address. There's a NOERROR response as well. - MoSheikh
In this case I would suggest you to open a ticket through the Google Issue Tracker or contact the support, so they can inspect your project and troubleshoot this issue. - tzovourn
@tzovourn Thanks - I've raised the issue and hopefully will be able to get a response - MoSheikh

1 Answers

2
votes

Truly one of the dumbest mistakes - I had switched over gcloud projects at some point and forgot to reinitialize with gcloud init.