How to map a custom domain to an app-engine app via Cloud DNS api?

孤人 提交于 2019-12-21 19:31:43

问题


Is there any documentation to explain how to map a custom domain to an app hosted on App Engine and solely via Cloud DNS API or any other Google Cloud API?

I've already added a CNAME record for the "www.my-domain.com." pointing to "ghs.googlehosted.com.", and I've set the name server addresses I've received from the Cloud DNS, on my domain registrar account. But I still get a 404 on a google server (a 404 page with google logo, etc).

[Update]: As I've mentioned in my other reply on this thread, Amazon Route53 service has a specific kind of "alias" DNS record which you can map a domain to any resource on AWS (load balancer, EC2 instance, etc). But I can't find any such DNS mapping on Google Cloud for an app hosted on App Engine.

Thank you.


回答1:


You've completed half the steps actually, as Jarod pointed out, you also need to register your domain in the web console.

The Cloud DNS service takes care of specifying where traffic meant for your CNAME should go. Registering your domain in the web console will essentially tell Google when receiving traffic from www.my-domain.com. to redirect it to your-app.appspot.com.

I hope this helps.



来源:https://stackoverflow.com/questions/25275749/how-to-map-a-custom-domain-to-an-app-engine-app-via-cloud-dns-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!