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.
Related
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).
I have a GAE app set up to use a custom domain, let's call it mycustomdomain. This naked domain is working fine over HTTP and HTTPS. I also have a service called api, it can be accessed successfully by going to http://api.mycustomdomain.com (custom domain convention).
However, I can't access the api service over HTTPS. I uploaded a SSL for mycustomdomain.com, but I got an error (site can't be reached) for trying to accessing the api service over HTTPS. My question is do I need to purchase the wildcard.mycustomdomain.com SSL in order to access the api service over HTTPS? I don't have much experience dealing with SSL certs and GAE custom domain, so any help would be greatly appreciated. Thank you!
Edit: updated information for GCP Console configurations.
My app setup in the Console contains the following:
Services: default, api
Custom domain setup: mycustomdomain.com
SSL uploaded: ultrahdlivewallpaper.com (NOT the wildcard version), api.ultrahdlivewallpaper.com (unable to be enabled for custom domain, none matching)
More detail: The problem is when I map both ultrahdlivewallpapers.com and api.ultrahdlivewallpapers.com, they are both mapped to the default service. I want api. to point to the API service. If I only map ultrahdlivewallpapers.com, that allows me to access api service at the api subdomain, but then the api SSL can't be applied to api. subdomain because it's not listed as a subdomain.
07/24/17 Update: I believe this is a limitation with the App Engine Settings after trying out several scenarios via GAE Console. We have a custom domain set up for ultrahdlivewallpapers.com and enabled the SSL cert for this domain. The domain is pointing to the default service. We have a second service set up called API. Google's routing rules for any service set up is via HTTP:// service-id.custom-domain, which in our case is api.ultrahdlivewallpapers.com. However, when I upload the SSL for the api subdomain, Console couldn't find matching domains because the api subdomain is not specified via the Console. Now if I set up api.ultrahdlivewallpapers.com as a custom domain, I'm able to enable the SSL for api subdomain. Problem then becomes api subdomain is now pointing to the default service instead of the api service. If I remove the api mapping, I'm able to browse to the api service again, but no HTTPS! I don't believe there is a way to get this set up correctly without a wildcard SSL enabled for all subdomains. Please let me know if I'm missing anything. I have tried everything I can think of via the Console. Thanks.
You don't necessarily need a "wildcard" cert, per se. But, you do need to get a cert that covers all the subdomains. For example:
mycustomdomain.com
www.mycustomdomain.com
api.mycustomdomain.com
It's a standard solution, and not difficult to do. Certbot (Let's Encrypt) makes it easy.
If you choose to get a wildcard certificate installation is pretty straight forward:
You upload the certificate in the developer console (in App Engine -> Settings -> SSL Certificates -> Upload a new certificate). May require a bit of effort, see also Google App Engine SSL with Let's Encrypt "could not be inserted".
Once it's visible in the certificate table you can click on its name and you'll end up in the certificate edit screen where you can select which custom (sub)domains it applies to (from the list of all custom domains mapped in the app), looks like this:
Note: these are the corresponding custom domain mappings:
If you have another app (under the same admin account) which is also mapped to subdomains of the same domain you can activate the certificate on it as well in a similar manner (the console automatically shows the certificate in the list when you switch apps, no need to upload it again).
I have hosted my application in Google App Engine. Now I can able to access my app using example.com and as well as www.example.com. Now I want to redirect every request to www.example.com. How to perform this redirection?
It's nothing to do with django or appengine. Look into your domain hosting and find out how to change Cname record (domain forwarding. )
If you are handling the domain using Google Apps for Work then you can do so from Admin Console > Domains > Change redirect and then follow the instructions. Either case as it's already mentioned you will have to change/update the CNAME records from your domain provider.
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)
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.