1

To be able to use a custom domain with my GAE application, I've contacted with my DNS provider and made them add to add 4 A and 4 AAAA records as described in https://cloud.google.com/appengine/docs/domain. I also made them add a CNAME record for directing the www sub-domain, the current state of the DNS configuration can be seen in http://intodns.com/suatgonul.com and in http://www.tcpiputils.com/browse/domain/suatgonul.com.

The problem, now, is that while www.customdomain.com works, customdomain.com does not work. Could it be related with DNS propagation latency? I tried Tor Browser and there customdomain.com also works. I'm not sure what to understand from this.

Furthermore, here, https://cloud.google.com/appengine/kb/general#naked_domain, it says that "Naked domains are not supported if you are serving your App Engine app through Google Apps". However, I'm not sure whether I'm using Google Apps to serve my app. I just used Google Plugin for Eclipse.

So, my question is: Is there any other thing that I should to configure naked domain for Google App Engine?

suat
  • 4,239
  • 3
  • 28
  • 51
  • Is your customer domain setup on Google Apps, or have you done all the domain configuration through the Google Cloud console? When you say "customdomain.com does not work", what happens? Are you using https? – tx802 Feb 28 '15 at 21:18
  • @tx802 I just used Cloud console i.e. console.developers.google.com to add a custom domain for my app, then I added the required DNS records via the DNS provider. By not working, I mean that when I try to open the site without the www, browser simply returns a "This webpage is not available" message. I'm not using https. – suat Feb 28 '15 at 21:44
  • Google plugin for eclipse is a plugin for eclipse. Google Apps is the web service that's managing your domain name resolution to app engine instances when the google network gets asked to resolve the IP address of your domain. (just to help further clear up your confusion about that re: the end of your question) – DT Rush Mar 01 '15 at 00:42

3 Answers3

2

TL;DR is bolded.

In essence, you need to somehow direct the "naked subdomain", or the apex domain, to the same location as the www. subdomain.

In the bad old days, you would do that with an A-name record in your DNS zonefile, pointing to your individual server's IP address. If they reached the apex domain, they'd be sent to the same location as www. (assuming www. also went to your server's IP, of course), although their browser would still only show domain.com/etc....

This doesn't scale well, unfortunately, when you don't have a static IP to map to. When we're dealing with cloud hosting, like App Engine, instances inside the data center are responsible for software-defined networking that does funky things with DNS behind the abstraction of that ghs.googlehosted.com CNAME record you used to map requests on your domain through an existing Google Apps domain resolution/hosting service that points to your App Engine instances.

In the documentation related to Apps domains, you can find instructions on how to map your naked subdomain to www (or any other subdomain), and it simply works. No static IP needed.

You can read a bit more about naked subdomains and how some DNS providers are offering record-types in zonefiles that will allow you to route the apex domain to a subdomain right in the host resolution phase of a connection in this SO answer.

Community
  • 1
  • 1
DT Rush
  • 171
  • 1
  • 10
  • thanks for the answer. Well, I don't have a Google Apps account. However, I think my DNS configurations are already inline with the App Engine documentations. (http://www.tcpiputils.com/browse/domain/suatgonul.com, https://cloud.google.com/appengine/docs/domain). As I'm sure now that I'm not using Google Apps, I think this should still work (even if it's not scalable) based on the explanations in https://cloud.google.com/appengine/kb/general#naked_domain. Is there something that I miss? – suat Mar 01 '15 at 08:53
  • I don't understand what you're saying. Are you talking about putting an ANAME record to an IP address for the naked domain in your zonefile? The page you linked itself says "*App Engine does not currently provide a way to map static IP addresses to an application. In order to optimize the network path between an end user and an App Engine application, end users on different ISPs or geographic locations might use different IP addresses to access the same App Engine application. DNS might return different IP addresses to access App Engine over time or from different network locations*" – DT Rush Mar 01 '15 at 19:15
  • If you follow the "*Options for customizing web addresses*" link on that page, which is linked specifically to explain how to route the naked subdomain, you'll find a link to Apps help for Apps domains, which leads ultimately to the same page I spent time finding for you. So... just re-read my answer and/or follow the links and parse the meaning of words you find online? :) Enjoy! – DT Rush Mar 01 '15 at 19:17
  • _"Options for customizing web addresses"_ are for Google App users. Based on the documentation, for non-Google App users like me, what I understood is that it is enough to add A and AAAA records, pointing to IP addresses provided by Google, to be able to use a naked domain for an App Engine application. And I've already create those records in my zonefile located in a custom registrar. That's what I meant. Anyway, thanks a lot for the time... – suat Mar 01 '15 at 19:42
  • Hmm, I'm interested what those IP with the A/AAAA records are. Thanks, I learned something new today; I set up my routing through Apps because I have a requirement of SSL, and have't seen that alternate way in GAE-only. There's a lot of discussion in the public issue tracker for GAE atm for SSL without Apps (just looked this up), so I hope that gets implemented soon, and I'd much rather do it all in the GAE console like you. So although I'm not sure how those A/AAAA records work, for you anyway it seems like only DNS propagation is left before your naked domain uses that method to get routed. – DT Rush Mar 01 '15 at 21:12
  • You can see the IPs through the _tcpiputils_ link I provided before. It's been almost 2 days since the DNS record updates, so I suspect from a mis-configuration on the registrar side... But, the strange thing is that when I use Tor Browser, naked-domain also works. So, the problem might really be the propagation delay... – suat Mar 01 '15 at 21:34
0

As documentation states you don't have to use Google Apps as you are using http (not https). I think you should play with wildcards for subdomain mapping. Try with "*" as described here [1].

Finally, remember that it may take up to 24 hours for DNS changes to take effect.

[1] https://cloud.google.com/appengine/docs/domain#more_about_wildcard_subdomain_mapping

Layo
  • 677
  • 6
  • 16
0

Things changed since this question was asked, custom naked domains are now supported directly by GAE, without the need of Google Apps. See How to use Google app engine with my own naked domain (not subdomain)?

Community
  • 1
  • 1
Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97