Error mapping custom domain on Appengine - google-app-engine

I'm trying to map a custom domain in a Google Appengine project. Following the instructions listed in the Settings > Custom Domain section of the Google Cloud Platform Appengine Console, I'm able to map a subdomain www to my domain, but the mapping fails for the naked domain.
The error thrown up is: "There is an operation pending for this application. Please wait and try again."
I had earlier set up naked domain redirection in G-suite, but the G-suite account was deleted later. However, this error persists.
Has anyone else faced a similar problem?

Related

Google App Engine redirecting all naked domain requests, causing letsencrypt to not work

I have a GAE app and a custom domain registered on enom.com. The app is a static website that's configured by app.yaml.
I'm trying to use LetsEncrypt certs for ssl, so I want to have valid certs for both www.example.com and example.com. I can get the cert for www.example.com working fine.
However the problem is in my naked domain. Whenever a http request goes to http://example.com/, it gets redirected to http://www.example.com/, ok. But, if a http request goes to e.g. http://example.com/a.html, the request is still redirected to http://www.example.com/. So when LE servers come looking for their well-known acme-challenge, it fails because they see index.html.
I guess this isn't a common behavior because no one is mentioning this, not at https://code.google.com/p/googleappengine/issues/detail?id=10802, nor at https://github.com/certbot/certbot/issues/1480.
I've tried to dig into why this is happening, one error I can see is here:
If I select to overwrite, GAE says it "failed to insert mapping"
This whole project was started by another person and he claims he's not aware of example.com being assigned anywhere else. I've looked at his Google Cloud Console and it would seem that he's correct.
Maybe something of interest is that in the Domain page of admin.google.com, naked domain redirect is set up. It redirects example.com to www.example.com. I've not found a way to disable it.
On my dns registrar, I have input the four A records, four AAAA records, and a www for CNAME.
TL;DR: My LetsEncrypt acme-challenge is failing for my naked domain, help!
I started getting the same error in app_engine after I went to Google Apps account and added example.com to redirect to wwww.example.com. After I did this, in app_engine I got "is already mapped" error. And there was no way to undo the redirect in Google Apps, so my guess was that Google Apps had mapped it and so App Engine could not modify it or add it. I had to explain this to Support team, and btw Google Apps support is free to call, so contact them and then get transferred to App Engine support team.
There is no way to fix it yourself, you have to get Google Support on call and explain clearly and they can reset. I was bounced between Google Cloud and Google Suites (Apps) support teams 7 times and after 2 weeks finally resolved, each one blaming the other, until I found a guy who understood this issue and fixed it for me.

How do I enable SSL for custom domains on appengine?

How do I activate SSL for custom domains on Google Appengine?
The instructions I have read, at https://developers.google.com/appengine/docs/ssl or https://support.google.com/a/answer/2644334?hl=en , seem to refer to an old version of the admin console for Google Apps.
I looked at https://support.google.com/a/answer/2644334?hl=en , but on the current console, if I do Security > Advanced Settings > Set up SSO, there is no place where it asks for the AppEngine Application ID.
I looked at https://developers.google.com/appengine/docs/ssl . It directs me to go to the Admin Console of my App domain, and to find a Domain Settings tab and then go to the SSL subtab. There is no Domain Settings tab, however, and the "Domains" tab only allows me to add domains (without http / https mention).
So, how do I setup SSL for my appengine app that uses a custom domain?
Note: this question has been asked already on StackOverflow, some years ago, but the google dashboards have changed since then, and the information I could find is no longer relevant.
Ok, so that other people can avoid wasting as much time as I did.
When you go to the admin console for your domain, you need to click on Security, but NOT on Advanced settings. Rather, pay attention to the small "Show more" below the other options. If you click that, "SSL for Custom Domains" will magically appear.
No thanks to Google for this horrible user interface.
Hallelujah to Luca. I've wasted a day on this. I had already added the custom domain in the GAE app engine console and was getting the cryptic "We are unable to process your request at this time. Please try again later. (Error #1000)" message.
I wasn't able to assign the certificate to my custom domain. The custom domain wouldn't show in the list in the GAE Security Settings (custom domain) until after removing the custom domain from the GAE console.
AppEngine Introducing managed SSL for Google App Engine for customs domains and it will be got activated automatically, for already added domains please remove it and add once again
More Information-
https://cloudplatform.googleblog.com/2017/09/introducing-managed-SSL-for-Google-App-Engine.html
https://cloud.google.com/appengine/docs/standard/python/securing-custom-domains-with-ssl

Why does adding a second domain for my appengine application result in an Invalid Domain error?

I have an appengine app hosted on mylongdomain.net
I have added a second domain to my google apps account, it's a short Palestine domain: short.ps
When I try to use the admin console to add this domain to the list of URLs for my appengine app (in admin console->more controls->App engine apps->my app name under "Add new URL") I am able to select short.ps from the dropdown list of domains. However, when I try to add it as http://www.short.ps, I am unable to do so. I get the error "Invalid Domain".
My domain is verified and the CNAME record is correctly pointed to GHS.GOOGLEHOSTED.COM.
Does anyone know why I am getting Invalid Domain error and what I can do to fix it?
Thanks in advance!
This appears to be a bug in the Admin console. Apps support was completely unhelpful: "we don't support the app engine apps part of the admin console".
However, setting up a second google apps account for domain short.ps and also adding the appengine app to that account seems to have done the trick.
Google Apps Secondary domain currently has lot of restrictions , one of those is secondary domain are not supported in Google AppEngine, and one cannot switch primary domains too(as of now)
link to limitations for secondary domain : https://support.google.com/a/answer/182081?hl=en
the simple solution would be to add your domain as Alias to primary domain, then point it to your AppEngine app by setting appropriate CNAME, it will work (i have personally tried it)

SSL Error using custom domain with Google App Engine

I followed the steps detailed here to use a custom domain with google app engine.
I'm the admin of the Google Apps account
I'm the owner of the Google App Engine account
I've added the domain to my Google Apps account through my App Engine account
I see my App Engine app in my Google Apps account
I set the CNAME "test" to point to ghs.googlehosted.com
I added the web address under my Google Apps account and it says "Your users can access my-app-id at: test.mydomain.com
Now when I go to http://test.mydomain.com, it redirects to https://test.mydomain.com and I get an SSL connection error (Unable to make a secure connection to the server.)
I called Google Apps customer support because I have a paid business account, but the customer service guy said that this falls under App Engine support and he was not trained in this issue.
Help!
If you've done everything correctly, you should be able to access your site at http://test.mydomain.com. It sounds from the error you're getting that you're attempting to access it at https://test.mydomain.com (https as opposed to http).
If you want to access your app over SSL at your custom domain, you have more setup to do, as documented here: SSL for a Custom Domain. The steps necessary are many and subject to change; that link is the official source of current information on the matter.
Update: From your updated information, it sounds like you may have secure: always set in your app.yaml, or the Java-configuration equivalent of this setting. It would be helpful if you posted your configuration file.
Also note that it takes several minutes for Google to add a certificate on a domain you recently imported (it may require time for DNS configuration to spread). I personally didn't need to add any secure: configuration, it just worked after some time.

Map Google App to non-primary account for google for business

I have made a website using Google app engine that I would like to map to my own domain.
I have added the app as a service following instructions given.
I then attempted to add a new URL for the app so that it would could be fount at www.mydomain.com.
How when I attempt to add this domain I get the error "The term mydomain.com is not allowed".
I have searched all over and can't seem to find out what the issue is. I have contacted support and they have said they can't help me with non-core services, even though this is an error given in the control panel.
Does anyone have any ideas?
I assume you have a google apps account for that domain and are trying to bind the gae application to this domain.
If so, put only "www" in. It will add the application to www.mydomain.com.
Adding the application to the root( mydomain.com ) is not possible in general. (But for the primary domain its possible to set a redirection)

Resources