Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automating wildcard subdomain for users GAE

Tags:

I have an app engine instance project under let's say: cloud.domain.com

My goal is to be able to give a user of my a unique url that they can then map to their own domain using a CNAME record. Basically how you would connect to a domain to a squarespace account.

It could really be anything like so:

userid.cloud.domain.com
userid.domain.com

Is this even possible with GAE? I've researched wildcard mappings but there really isn't any solid advice on the topic.

Is this even possible or should I look elsewhere to accomplish this kind of task?

like image 801
bryan Avatar asked Mar 26 '16 23:03

bryan


1 Answers

  1. You need a domain host that allows you to set up wildcards in the DNS records
  2. Create a CNAME for *.mydomain.com (or *.sub.mydomain.com) pointing to ghs.googlehosted.com
  3. In App Engine section in Cloud Console, under settings/custom domains, add the custom domain (you will need to verify ownership by adding a TXT record)
  4. Once verified, add *.mydomain.com (or *.sub.mydomain.com) to the point section
  5. Webapp2 in Python has a function DomainRoute to wire this up at the code level, you will need the find the PHP equivalent
like image 144
Ron Chan Avatar answered Oct 20 '22 14:10

Ron Chan