Google
 

Sunday, February 16, 2014

My sad experience with Google app engine and domain names

So I decided to use Google app engine to host a small website. And no, it's neither the the programming language I'm not familiar with (python, it's cool and I like it by the way) nor the bad development and debugging experience that I had, is what I'm going to tell about this time. So what is it about? read on.

Pick a nice name for your baby
It was super easy to create an app with a temporary name like example.appspot.com. I reserved the domain name with the hosting company I'm used to. So I just need to assign the domain name to the GAE site and that's it. Quite a common task, right?  Sadly not.

You need a Google apps account
First, you need to create a Google apps account. You can't just assign the domain name directly. Anyway, not a big deal when apps had a free tier, but this is no longer the case. So I tried to use my existing free Google apps account that I've created years ago.
For Google to verify your ownership of the domain,  you have to add a value to the domain name DNS records. This sounds OK to prove that you control the domain. To get that value you should go to the Google apps administration page (https://admin.google.com) and click "more controls" then scroll to the right to find the "domains" icon.
Then you should select to add a new domain. and after you get the CANME or TXT record value to add to your DNS and wait for verification,  the domain should now be available for use. Except that it's not.
To make the domain point to the application you created (example.appspot.com) you need to go to the administration home page and select the "App Engine Apps". Then select "Add Services" and enter the app Id.
And now, you select to add a URL to access the app, just to find that you cannot use the domain you've just added!! You can add a sub-domain of the original Google app service login!. What's the point in verifying another domain? I don't know!

Anyway. I went to another option by applying for a new Google apps account with a 30 days trial. And after the tedious steps of domain verification and service addition, finally I have my domain pointing to my GAE app. Hopefully, the domain will still work after the free trial expiration.

End of story? never.


Naked domains: 
Whether you should add www before your domain name or use naked domains is a religious war that I'll not discuss here. But if you want to use naked domains with GAE you're out of luck. It's not supported. 
So if the user writes (example.com) in the browser's address bar, he's not going to your app. You must redirect the user to (www.example.com). Some domain registrars support this feature, but my hosting company doesn't, so I had to do it myself. I pointed the domain (example.com) to a site on my hosting space, and used an asp.net HTTP module to redirect requests to the www version (www.example.com).

Note: Apparently, there is another way to do it. But I'm not sure how get it to work using my hosting provider control panel.

And some spam
Since I did not configure email on my newly created Google apps account, Google kept sending me emails about how much I'm missing. OK. I did not need all this mess in the first place.

Just Why?
My guess is that the whole experience is geared towards promoting the apps model from two sides: you should have a Google apps account, and you should purchase services from Google market place.
The experience was not friendly for people like me, who just wanted to created a web site. When did the www boom happen exactly?