If I want to run my service on google app engine (python), do they all me to create my own custom subdomains easily and without any limit?
For example, my service will run on my custom domain:
www.example.com
For each customer I will create their own custom domain like:
customer1.example.com
I may have 1000's of customers, so this would have to be easily done using an API call or they allow wildcards.
My application will analyze the subdomain and lookup the customer.
This will be a single application that will handle all subdomains.
Sure, have the wildcard (*) CNAME record of your domain (i.e.
*.example.com
) point toghs.googlehosted.com
in your DNS panel and all requests to any subdomain of your main domain will go to your app (and make sure this is also reflected on the GAE's Custom Domains Settings Page as shown on the screenshot below):Then have one of your first webapp2 routes as something similar to:
which will match requests to any subdomains but the
www
one (since you might want to serve your actual app via that one).And your
CustomSubDomainHandler
could look simmilar to: