title: One application, many domains on AppEngine
body: <p>I searched, did not find this question asked before (it is NOT the same as for example <a href="https://stackoverflow.com/questions/1990041/many-custom-domains-for-appengine-instance">Many Custom Domains for AppEngine Instance</a>) but please correct me if I'm wrong.</p>
  
  <p>I have previously used ASP.NET to build a web application which is then used by several companies. I use the same code base and I deploy it to the same IIS web site, but each company has their own database. When a request is received, I check the hostheader of the request and map it to a content database (the mappings are contained in a shared configuration database).</p>
  
  <p>This gives me one application to maintain, fix bugs in and deploy, while the actual data for the different companies is completely separated in different databases. It is easy to export one company's data, and I feel safe not accidentaly mixing different companies' data.</p>
  
  <p>I'm now considering rewriting this webapp in Java/GWT and publish it on AppEngine. My question is: what can I do to mimic the same behavior on AppEngine? Should I have one app per company? This would mean I would need to deploy the same app several times, once for each company's site. It would also mean each app would cost at least the minimum $9/month (I don't think the free limits on AppEngine will be enough). Is it possible to create one app, and then map it to several custom domains (like I do in the .NET-app today)?</p>
  
  <p>As I understand the Google Apps idea, an administrator should be able to just add a cloud app to his/her domain using the app ID on AppEngine, and then start using it. Is there any  support for enabling separation of data for different Google Apps domains which have registered for my app? Can I programmatically check the hostheader, and act on it as I do in my .NET-app? I don't want one domains data to be available for the other domains (in fact, that would be VERY bad in my case :) ).</p>