I am having my application deployed to GAE with main domain http://www.mysite.com. When someone subscribe to my application, he will use email id username@company.com.
I want to capture the company from the email id, and set the url as company.mysite.com that will map to http://www.mysite.com. I think this can be done by using * wildcard CNAME on domain registrar cpanel. But, as per thread How to set dynamic subdomain cross server or in DNS setting we can’t set wildcard domain with GAE.
So, my question is how should I do it programmatically from email id so I don’t have to manually set sub-domain for each company? Can I use wildcard sub-domain on GAE or I need to do some research on route53 of AWS?
Note that I have registered my domain from godaddy.
Instructions
mysite.com)*as your subdomain in step 5CNAME, enter*as the name, and the value should be set toghs.googlehosted.com(or whatever is provided to you through the setup process in step 5)That’s just about it. You’ll have to wait a bit for the DNS settings to properly propagate, but now
wildcard.mysite.comshould point to your app.NOTE
This will allow ANY wildcard to point towards your app. See the notes under More About Wildcard Subdomain Mapping in the Custom Domain Setup Process page linked above. You can limit what subdomains are “allowed” in your app by processing the value in your app and returning 404 errors or the like for subdomains you do not want to acknowledge (in your use case, any value that is not a company name of a user who has signed up for your application)