6
votes

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 addresses:
    owon.ro. ->
    216.239.32.21
    216.239.34.21
    216.239.36.21
    216.239.38.21

  2. CNAME
    www.owon.ro. -> ghs.googlehosted.com.

And also some MX records.

The problem is that the app is reachable from the www subdomain and the help section states that those IP addresses should be in the A record for the naked domain to redirect to www, but it doesn't work.

I also tried to use @ wildcard for the A record but that doesn't work also.
If you go to owon.ro you will see a 404 page but the www subdomain works.

Am I missing something?

Thank you

3
I presume you followed the GAE custom domain instructions (particularly step 5c instead of 5b): cloud.google.com/appengine/docs/python/console/…Dan Cornilescu
Yes @DanCornilescu I followed step 5b to get the www subdomain working. As I said there is a CNAME record that points www to ghs.googlehosted.com. If I go back to developers console > custom domains and choose to also point the naked domain to my app engine app it tells me to add those four IP addresses as A records which I already have..Andrei Onel
On a different domain I used Google apps so I was able to make the change as @AndreiVolgin suggested, but in this case I am not using Google apps, so I don't have access to Google adminAndrei Onel
Yes, but did you also add the naked domain (in addition to the www one) - are they both listed as custom domains for the app? The 4 records are an additional requirement, not the only requirement. Note: I'm just guessing here, I'm also doing the redirect through google apps (but I ran through a similar exercise when I set that up - couldn't add the naked domain as I already had the www one, I had to remove the www one, add the naked one, then re-add the www one as a subdomain of the naked one)Dan Cornilescu

3 Answers

5
votes

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

2
votes

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
votes

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