Just so that I understand this correctly.
I would like to get a Google Apps account where I can develop many websites and host them all on that one account. (I'm not referring to Google Sites)
Is this possible or must I register a new Google Apps account for each website?
As per the comments above:
It looks like you need to handle multiple website within ONE app. Once all the domains are verified, there are at least two ways of doing so:
1. You can create a new Module for each website. This will keep things a little better organized. Each website will be in its own folder and run in its own instance. There will be a single dispatch.yaml
which will redirect the requests depending what domain they came to i.e.:
dispatch: - url: "wwww.example1.com/*" module: website1 - url: "wwww.example2.com/*" module: website2
Read more:
Note that dispatch.yaml
can only have 10 routing rules. Also, free apps can have up to 5 modules and paid apps can have up to 20 modules. So if you plan to host more than 5 (module limits) websites on a free app or 10 websites (route limits) this might not work well for you so see option #2 which potentially doesn't have any limits although requires more manual work and the websites will be running on the same instances..
2. You can simply use your framework's route handlers to see what domain the request came to and depending on that make a decision manually and give it a particular website's handler i.e. in Python/webapp2 it would be like this:
import webapp2
from webapp2_extras import routes
app = webapp2.WSGIApplication([
routes.DomainRoute('www.example1.com', [
webapp2.Route('/', handler=Example1SiteHomepageHandler, name='example1-home'),
]),
routes.DomainRoute('www.example2.com', [
webapp2.Route('/', handler=Example2SiteHomepageHandler, name='example2-home'),
]),
])
Read more: