Wednesday, April 13, 2016

Automating wildcard subdomain for users GAE

Leave a Comment

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?

1 Answers

Answers 1

  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
If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment