Programmatically setting subdomain on Google app engine

后端 未结 2 1550
旧时难觅i
旧时难觅i 2021-02-11 10:10

I am having my application deployed to GAE with main domain www.mysite.com. When someone subscribe to my application, he will use email id username@company.com.

I want t

2条回答
  •  感动是毒
    2021-02-11 10:14

    Instructions

    1. Sign up for AWS Route53
    2. In your new Route53 account, create a new Hosted Zone, the value being the domain you are hosting on GoDaddy (in your example, the zone name would be mysite.com)
    3. Now follow the steps here Under "Setting Nameservers for a Domain Name Registered with Us" >> "I have specific nameservers for my domains" (you'll put in the name server provided to you in step 2)
    4. Now, this domain needs to be a Google Apps domain, so if its not, sign up for Google Apps or add the domain to your existing Google Apps account.
    5. Go through the Custom Domain Setup Process but enter * as your subdomain in step 5
    6. Go back to your Route53 Console and Add a new record set to the Hosted Zone you made in step 2. Switch the Type to CNAME, enter * as the name, and the value should be set to ghs.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.com should 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)

提交回复
热议问题