Naked and www custom domains with Google App Engine - 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".

Related

Mapping Google App Engine with Google Domains

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).

How to access GAE application through multiple custom domains over HTTPS with single UC/SAN certificate?

we have following situation:
we have an application on Google App Engine (GAE)
we want to be able to access this application from 3 different custom URLs through HTTPS. (let's say a.com, b.com, c.com)
we have Unified communiction (UC/SAN) SSL certificate for those three domains
for accessing GAE applications through custom HTTPS URLs, GAE requires to have Google Apps for Work account.
only primary domains of Goole Apps for Work accounts can be used for accessing GAE applications through custom domains over HTTPS. link
so we've created 3 Google Apps for Work accounts
now when I log in to admin.google.com for a.com and try to upload our SSL UC/SAN certificate covering our 3 domains, I get a message "The SSL certificate references subdomain outside of managed domain.". I infer that it comes from requirement
All subject names on the host certificate should match or be subdomains of the domains associated with the account in the Google Apps Control Panel.
How can this be resolved ?
Is it possible at all to access one GAE application through multiple custom domains over HTTPS by using one certificate ? Or do we have to get separate certificate for each custom domain?
From Google's docs it looks like they do support SAN [1], however it seems only in the case of subdomains. Since you have a Google Apps for Work account, you have access to technical support (admin.google.com -> Support) and this seems like it would be a good question for them (ie. "Can I use a SAN cert with multiple second-level domains with Google Apps, or is it subdomain only?").
[1] https://cloud.google.com/appengine/docs/ssl

Host GAE app on a domain without purchasing a Google Apps account for that domain?

I have purchased my own domain name, and I have created an App Engine app. I'd like to configure GAE so that the app can be served off the domain name that I own.
It appears as though I must create a Google Apps account for that domain in order to host the GAE app on that domain. This costs $50 per year, which I'd rather not pay.
Is there any free way to host a GAE app on my domain name?
Using a Custom Domain
When you create an application with Google App Engine, the app is
automatically served on the appspot.com domain at
your-app-ID.appspot.com. However, it's often desirable to serve your
app at a custom domain that you own (example.com), at specific
subdomains of that domain (app.example.com), or at any or all
(*.example.com) subdomains of that domain.
It's easy to do this with App Engine. First, of course, you must
acquire a domain through a domain registrar. Once you have a domain,
customizing your app to use your domain or subdomain involves three
steps:
Prove to Google that you control the domain.
Configure Google servers to recognize the domain.
Update the DNS records at your domain registrar to point to Google servers.
The entire process can typically be completed in a few minutes at your
computer.
https://developers.google.com/appengine/docs/domain
It's not possible, you need a Google Apps account. But I think it's possible to create a free account with just one user (admin).

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)

how to serve appspot.com apps on custom domain?

I have an application http://faqs4j.appspot.com. I have purchased a domain called jobs4j.
I added domain using application settings in app engine console and also made necessory
CNAME changes in godaddy DNS managing console.
Now when I type in browser in.jobs4j.com it simply ridirects to http://faqs4j.appspot.com.But
I want my application to be served under sub-domain in.jobs4j.com and not just redirection to
appspot domain. what configuration I am missing?
thanks for your time.
In the application dashboard, under administration / application settings, you have a section titled "Domain setup". In it you can configure domains to be used for this application.
The process will require you to set up a "google apps" account (don't worry, a single-user domain is free), then transfer the domain(s) you want to be managed by Google apps by setting up a CNAME entry in your domain zone file. The instructions show you how to do it. Of course, where the instructions recommend you define your CNAME subdomain as "www", you will want your subdomain to be called "in".
Unfortunately, Google has ended the option to have a free Google Apps account, sigh!
However, we could still point the GAE app from a custom domain (non-Google apps owned).
Step 1 : Go to Application Settings in the GAE dashboard and add a
custom domain. You will be asked to verify the domain during which
Google would basically create a TXT record in your DNS zone file.
Step 2 : Once the 3rd party domain is verified, add the custom domain
for the app (my-gae-app.mydomain.app). It shows instructions
on how to add the CNAME entry for the domain.
Hope this helps!

Resources