I am making a web app with node.js using google app engine.
I want to redirect https://MY_PROJECT_ID.appspot.com to mycustome domain. I followed this maual but does not work. What is problem?
dispatch.yaml
dispatch:
- url: 'fermi.me/' //my custom domain
service: default
console
gcloud app deploy dispatch.yaml
Configurations to update:
descriptor: [./nodejs-getting-started/2-structured-data/dispatch.yaml]
type: [routing rules]
target project: [XXXXXXX]
Do you want to continue (Y/n)? Y
Updating config [dispatch]...done.
Even though, dispatch.yaml is successfully deployed, if I executed 'app deploy', Redirection does not work. I already registered domain in Google cloud, and static websites worked.
I found the fundamental problem and it solved.
I already connected to static website with bucket.
https://cloud.google.com/storage/docs/hosting-static-website
There is a error in web-console in App-Engine domains setting.(Message: "Domain is already mapped to a project in google cloud platform". There is a critical error in this maunal.
https://cloud.google.com/appengine/docs/standard/python/mapping-custom-domains
The sample error message. It only appears when you already connect storage static website to domains. error : domain is already mapped to a project in google cloud platform
You can use command-line tool with gcloud beta. Webconsole makes error but commandline works. After you mapped domain, you can now use webconsole. You should add cnames as the maunal above(mapping domains) explains There is a guide.