Google cloud DNS: point naked domain to www?

谁说胖子不能爱 提交于 2019-11-28 00:28:08

Found the answer in the end thanks to Dan Cornilescu.

If you use Google Apps you can set up to redirect the naked domain to www.

If not, you will need to follow the steps by going to
Console > App engine > Settings > Custom Domain.

In here, at the second step, you will have to point www to the app (by using the second option) and clicking Add.
And then also point the naked domain to it by choosing the first option and clicking Add again.

So if I understand correctly you will server the app using www subdomain and the naked domain in contrast to redirecting the naked domain to www as in the Google apps case.

In the end, my custom domain tab looked like this.

And my DNS records looked like this

The DNS operations suggested in step 5c (documentation here) are not enough, you also need to actually add the naked domain to the GAE config (in addition to the www one) - step 5d.

5. Continue to the next step the Add new custom domain form, selecting the custom domain you want to point to your App Engine app:

    a. Refresh the console domain page so it will list the domains properly.
    b. If you want to use a subdomain, such as www, use the second option (http://www.example.com);
    c. If you want to use a naked domain, use the first option to specify a naked domain (such as http://example.com).
    d. Click Add to create the desired mapping.
MFinder

To link the naked domain so it points to the www when you are NOT using appengine you simply add both the 'A' record and a '@' record pointing to the Google ips which are and look like this:

  A 300 
35.232.62.127

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