i am a newbie to Google app engine web application.there are two seperate gae web applications in which one application intended for staging and the other application used for live production purpose.we bought a domain for eg: example.com which we point to staging as
www.staging-example.com(it is working fine). what i want to do is that with the same domain name can i make it to point to the live production app like for eg: www.live-example.com. is it possible?.if its possible please tell me how?. your answers will be very appreciable.
thanks in advance
Please be aware that www.staging-example.com and www.live-example.com are two completely different and independent domains apart from the fact that they are both .com domains.
Since app engine does not support naked domain redirection with SSL (staging-example.com, live-example.com would not work with SSL) you have to use subdomains anyway, like staging.example.com and live.example.com.
And yes that is possible and basically the exact same steps for each app. Since you set that up for your staging domain this should be a piece of cake for you. The steps are described in here, but the highlights are:
Create a CNAME record for your subdomain which points to ghs.googlehosted.com
Add the custom domain in your apps project custom domain settings.
Related
By default, specific versions of an App Engine app are routed by URLs like https://[VERSION_ID]-dot-[SERVICE_ID]-dot-[MY_PROJECT_ID].appspot.com.
Is there any way to have something similar with a custom domain?
I currently have a subdomain mapping for my app configured with a CNAME DNS record pointing to ghs.googlehosted.com (my "naked" domain is not served by App Engine). This allows serving the default version of my app from that subdomain, but I also want to be able to test new versions of the app using my domain (for various reasons such as sharing cookies, etc.)
For example, let's say my domain is typeracer.com and my custom domain mapping in App Engine is data.typeracer.com: I want to be able to access a specific version of my app at a URL like https://[VERSION_ID].data.typeracer.com. Is there any way to do this?
I've looked at the App Engine docs for adding wildcard subdomain mappings and using a dispatch.yaml. However, it looks like that would work only for routing specific services, but not specific versions of the app.
No, what you ask for exactly is not possible as the mapping is a (sub)domain per GAE service one, you cannot select a certain version of a service in the custom domain settings screen.
Sounds like may be attempting to implement different environments (say staging) based on service versions, which has some disadvantage, see Continuous integration/deployment/delivery on Google App Engine, too risky?
If so you can try to implement them using different services instead, which:
would allow you to map one (sub)domain per environment
you'd avoid all drawbacks mentioned in the above-mentioned Q&A
The domain naming scheme you mentioned suggests variable nesting levels, which in itself can be problematic, see Sub domain not listed in Google App Engine while enabling SSL for custom domains. Maybe try something like https://data-[VERSION_ID].typeracer.com instead of https://[VERSION_ID].data.typeracer.com?
Google App Engine offers SSL for Custom Domains, but I'm not sure how to properly set it up with my app. Say I'm running myapp.appspot.com and I own myapp.com, can someone explain to me the exact steps I need to take in order to make my App Engine app serve on my .com domain?
Well, the basic process of setting up a custom domain is described here:
https://developers.google.com/appengine/docs/domain
Is there something in that article that isn't clear?
The article does delegate an important part of the process, which is setting up a Google Apps account for your domain (see "Otherwise, click Sign up for Google Apps and continue with this step." in step 3). A key part of setting that up is verifying you own the domain you're trying to set up. This requires that you make a small modification to your site, or serve a DNS TXT record. Read more about it here:
http://support.google.com/a/bin/answer.py?hl=en&answer=60216
I have deployed an application on Google App Engine and I want to link a Subdomian to that application.
I currently have a domain that is linked to a "live" site. from Google documentation I understand that i need to set up my domain with Google Apps:
To serve your app on a custom domain, the domain must be set up with Google Apps
(Source)
What exactly that mean?
I've looked in Google documentation and could get a clear idea...
Does that will effected my "live" site in some way?
just to clarify, www.mydomain.com - points a site that i own and i want sub.mydomain.com to point to my Google application.
You need to make a CNAME to forward to your app address.
Let's say your app address is https://yourapp.appspot.com, and you want sub.mydomain.com to forward to it, just do like below:
Please read THIS first, follow the steps until step 5. You'll need to type your mydomain.com in step 3, and type sub in step 5. After these, you'll some steps on how to Chang CNAME record, just follow:
set your host name to sub
Type: CNAME
IP address/host name: ghs.google.com.
Priority status: (whatever just make it's the number)
OK, and you'll visit your app by http://sub.mydomain.com, different hosting providers have different time to set it valid. :)
BTW, it'll not effect your "live" site in any way. As your main site use mydomain.com, and you just need sub.mydomain.com. What GAE said is that, if you want to set mydomain.com to your app, you need to set A type instead of CNAME type in your host. This domain hosting method includes more steps, you'll see GAE's doc that you found, and so it will effect your live site.
This means you have to register your domain with Google Apps here: https://www.google.com/a/cpanel/domain/new
You don't have to have your main website hosted on Google. Just how you arrange things is determined by how you configure your DNS which you will retain control of. Same for email you can have it delivered to Google Apps or not, depending on your DNS MX records.
You need to validate your ownership using webmasters by adding a txt record in you dns records, after that it will appears in the list of domains under App Engine > Settings > Custom domains.
I hear that now we can do wildcard subdomains on google app engine (I haven't tried it myself, but I believe that's been a new feature added), but can we have a domain point to it?
So
new.example.com (works?)
newexample.com -> new.example.com (does this work? where newexample.com is acting as new.example.com)
The way I envision newexample.com, this would work as
newexample.com/blog in the url, but app engine would support it as new.example.com/blog
I guess I am trying to emphasize that I am NOT looking for domain fowarding where newexample.com just forwards users to new.example.com
Thanks!
UPDATE: To clarify, I wasn't meaning naked domain, but a url like this
www.newexample.com/blog can work as new.example.com/blog or perhaps even more clearly, new.example.appspot.com/blog
Yes you just have to use an asterix *.example.com when setting up your custom domain in google apps.
To serve your app on all subdomains within a given higher-level subdomain, you can use wildcard subdomain mapping: enter an asterisk in place of the lowest-level name. For example, entering * will cause your app to be served on all subdomains within your registered domain.
See Custom domains
*.yourappid.appspot.com domains work by default.
You can add your app to as many different Google Apps accounts (so can use multiple domains), but you can not use domain alias' within Google Apps, as only the primary domain from a google apps account is used.
Applications that use Google App Engine are not available for users at non-primary domains.
See Limitations for multiple domains
If the question is:
Can the "naked" domain such as newexample.com (i.e. without anything such as www. before it) be served by Google App Engine?
Then the answer is no - see the FAQ
Wildcard subdomains let you have any subdomain the a user enters (e.g. myphotos.example.com, yourphotos.example.com, etc...) be served by Google App Engine without having to set each one up individually. Although it does require a DNS provider that supports wildcards.
I've been fooling around with the Google App Engine for a few days and I have a little hobby application that I want to write and deploy.
However I'd like to set it up so that users are not directly accessing the app via appspot.com.
Is hosting it through Google Apps and then pointing it at my own domain the only way to go? I looked at that a little bit and it seemed like a pain to implement but maybe I'm just missing something.
My other thought was to write the app-engine piece as a more generic web-service.
Then I could have the user-facing piece be hosted anywhere, written in any language, and have it query the appspot.com url.
Anyone have any luck with the web-service approach?
The reason Google Apps is required is because you need somewhere to a) verify you own the domain (otherwise, you might point it at app engine, then I might hijack it by adding it to my account) and b) set up domain mappings (which subdomains point to which of your appengine apps).
Since this stuff already exists in Apps, it seems silly to duplicate it in AppEngine.
As has been pointed out, it doesn't cost anything, and you do not need to "move" anything to Google. You simple created a cname record with a random name to verify you own the domain, and a cname for the subdomain you wish to point at App Engine. This only takes a few minutes, and once it's done, it's done forever.
Note: If you host your site elsewhere and use webservices, you need to scale the site/frontend. If you host on app engine, you get this for free :-)
I wrote an article on my blog about redirecting *.appspot.com domains to your custom domain to keep your branding:
http://blog.dantup.com/2009/12/redirecting-requests-from-appid-appspot-com-to-a-custom-domain
To do this, I believe you need to be using Google Apps and have a custom domain setup for Google Apps. Then, you deploy your app into your Google Apps domain.
Here is google's official instructions on how to do that:
http://code.google.com/appengine/docs/domain.html
I have used this process for a couple of sites and it is easy and painless, provided you have control on the DNS records for your domain (you should).
OK, we're now at the end of 2017 and things are a lot different regarding App Engine and custom domains. It's easy now!
Go to the app engine dashboard for your app and choose Settings, then go to the Custom Domains tab. From there, choose Add custom domain.
The tricky part is that Google needs to verify that you control the domain, so they ask you to put a TXT record in the DNS for your domain. Once you do that and Google it, you become "verified" as the owner of the domain.
After that, Google will give you a bunch of A and AAAA (for IP6) records to put in your DNS. Once you've done that, you should be good to go.
It can be easily done using request.getRequestURI() method. If the URL doesn't include your domain, just redirect it to the desired URL using
resp.sendRedirect("<your domain>")
Otherwise load a error page using
request.getRequestDispatcher("<error-page>").forward(request, response);