Google cloud DNS: point naked domain to www?

后端 未结 3 447
天涯浪人
天涯浪人 2020-12-06 07:49

I maintain the owon.ro domain which uses a simple App engine app. I also we use google cloud dns.

These are the dns records:

  1. A record with IP addres

相关标签:
3条回答
  • 2020-12-06 08:02

    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

    0 讨论(0)
  • 2020-12-06 08:03

    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
    
    0 讨论(0)
  • 2020-12-06 08:09

    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.
    
    0 讨论(0)
提交回复
热议问题