Mapping Google App Engine with Google Domains - google-app-engine

I am having trouble mapping the Google App Engine with Google Domains. I have a domain registered, let's call it example.com. What I want to achieve is both example.com and www.example.com can access the web application I deployed on Google App Engine. Also, I would like urls starting with either http:// or https:// able to visit the web application as well.
Therefore, there are four different urls I need to take care of: 1. http://example.com, 2. http://www.example.com, 3: http://example.com, 4. https://www.example.com.
What I have done is verify example.com and www.example.com on the Google App engine, obtained the records, then added the A, AAAA, and CNAME record to the Custom resource records in Google domains. After that, I use the Synthetic records on Google Domains to forward the subdomain #.example.com to https://www.example.com with SSL enabled, so I thought it should take care of the four cases I mentioned above.
However, after all thoses steps, the A and AAAA records are move from the custom resource records to the synthetic record. Recently, I am experiencing bugs in which webpages cannot be opened on the https:// url but are able to open on the http:// url.
I wonder if my subdomain forwarding is causing the issue I am seeing? If so, ow should I map all 4 urls to the web-application on Google App Engine and redirect them to the https://www.example.com?

Map 'example.com' to your app engine domain. Enable the free SSL certificate from app engine
Map 'www.example.com' to your app engine domain. Enable the free SSL certificate from app engine
In your app.yaml file, set the attribute for 'secure' to always. This means that when a user types in 'http//example.com', they will automatically get redirected to 'https://example.com'. This means you don't have to do anything extra on your end (i.e. no need for any forwarding)
Note that with the above setting, you will still end up with 2 sets of urls - the naked domain https://example.com and the subdomain - https://www.example.com. It is good practice to have only 1 set i.e. either forward all naked to the sub or vice versa. You can do it at the domain registration point or have your code do it (in your app).

Related

Naked and www custom domains with Google App Engine

I have added two custom domains to Google Developers Console for a Google App Project. One, a naked domain with A and AAA records set on the third party DNS manager as specified by Google. Two, a www domain with a Cname record set on the third party DNS manager, as specified by Google.
The www is serving, but the naked domain is not! The A records ip addresses timeout on my local machine but I get results when using http://tools.pingdom.com/ping/
Obviously you can use more than one custom domain but is there something I'm missing here?
Update: custom naked domain mapping is now supported directly in GAE, see How to use Google app engine with my own naked domain (not subdomain)?.
[Old answer follows]
If it's acceptable for you to use custom domains through Google Apps then you can use the Google Admin console to:
map your naked domain to Google Apps
redirect the naked domain to a certain (sub)domain of your choice
I find several advantages of going this way:
you can change the naked domain redirect without any change in the
GAE apps domain configs
the direct domain mapping of GAE apps (without using Google Apps) is
still very young, documentation is far from exhaustive
you can use SSL with your custom domains, according to the docs:
"To add Secure Sockets Layer (SSL) encryption (i.e., an HTTPS
address) to your App Engine app, you must use the SSL service
provided with Google Apps".

Google AppEngine: multple domain urls for a site

I have a website running on google appengine. Url being say: www.mysite.com
recently I acquired the domains www.mysite.co.in and www.mysite.org
Question 1: Can I attach these new domain urls to the same server so that .com, .org and .co.in all work and how?
Note: I am NOT looking for redirecting these new urls to .com url.
If you do not need SSL (only http) then you can simply add it in the Developers Console: https://console.developers.google.com/project/your_project_name/appengine/settings/domains
If you need SSL (= https) then you must first add the domain as an alias domain in your Google Apps account. Then you can go back to above link and map it to AppEngine instances.

Google Domain: Error 404 while redirecting to external site with cname www

I have purchased a two domains from google. Let's say a.com and b.com
My Appengine project is linked to a.com
I just have to redirect from b.com to a.com
I have forwarded the naked domain to a.com and have pointed the CNAME 'www' to '#'
But still, http://b.com gets redirected but, http://www.b.com does not get redirected. Instead I get an Error 404
Additionally, I think, the above purchased domain do not have fixed ip, hence pointing A-record of b.com to IP of a.com seems not possible
After having a long conversation with the Google Apps Representative, it seems that the configuration is all fine, but if you purchase a domain for google and do not pay additionally for google apps for atleast one user, subdomain forwarding is not possible.
In my opinion, just allowing naked domain forwarding but blocking subdomain forwarding (for essential subdomain like www) is not completely helpful. Cname redirects or subdomain forwarding to external site should have been allowed, whether or not a customer pays for google apps.
To sum it up, it seems that for every domain you purchase from google you are compelled to purchase a registration of google apps.
The Google App Engine service allows custom domains through virtual hosting. Adding a CNAME in DNS will fail because you need to configure a domain alias in order for App Engine to recognise it.
Add your domain alias through your corresponding Google Apps account as explained here
If your domain alias is not that important in itself, configure URL forwarding on the DNS level, this will redirect your browser to the primary domain.
Incidently, it's not because an IDE plug-in such as the Google Eclipse plug-in doesn't distinguish between GWT and App Engine projects that you shouldn't either: this is totally unrelated to GWT :-) (you linked this on the Google+ GWT community)

Redirect version.appidentifier.appspot.com to my own domain's subdomain

I have a GAE app and I have already been able to redirect appidentifier.appspot.com to my own domain's www subdomain and the naked domain. For example, if I owned foo.appspot.com and foo.com, then entering in www.foo.com or foo.com into the browser will render the contents of foo.appspot.com successfully. I configured all this using Google Apps on the Google side of things and NameCheap on the registrar side of things.
Now, I have made a new, non-default version of my GAE app. Let's call it dev.foo.appspot.com. How do I set up a URL forward (or what-not) so that I can access this GAE version by simply entering dev.foo.com into my browser?
What you are looking for to do is possible if you set up a wildcard subdomain mapping. This is well documented in the final section of Using a Custom Domain.

appengine : pointing a domain to subdomain

can i point
http://www.mycustomdomain.com
to
http://myapp.appspot.com
using cname record or other gimmicks ? I do not want to use google apps.
it is possible ?
If you don't want to use Google Apps, you could serve redirects to your appspot address from another HTTP server somewhere. You cannot do this with DNS settings alone without Google Apps; the server needs to know which application to serve for a given request URL, and if the domain isn't a Google Apps domain, you can't configure this. Note that if you use redirects, the user will not see your domain name when visiting your app; once they're redirected they'll be viewing at an appspot.com address.
Are you aware that there's a free level of Google Apps service, that you could set up only to serve App Engine apps?

Resources