user246114
user246114

Reputation: 51701

Adding a subdomain to my google app engine project?

I created a google app engine project. I just successfully mapped it to a new domain. The name of my project is "grape". So by default, it is published at http://www.grape.appspot.com. I mapped it to http://www.grape.com, which is terrific.

Now I'd like to create a new app engine project, and have it mapped to:

http://api.grape.com

how do I go about doing this? I think it is possible, I'm just not sure where I would do this mapping? Since I own grape.com, I am hoping I can map a new project to t.

The basic idea was to have one project which is responsible for the UI stuff, then a second project responsible just for a public api, which would be great.

Upvotes: 6

Views: 11769

Answers (2)

Kelly MacInnis
Kelly MacInnis

Reputation: 289

I just got this working!

I already had one project at example.com. I wanted to move it to test.example.com and point example.com to a new project.

I followed the docs (http://code.google.com/appengine/docs/domain.html), as Alex suggested, to map test.example.com to the existing project in GCP. Note that you do need to verify ownership of the subdomain. Then I deleted the existing mapping to that project.

I did not update the domain custom resource records yet. I switched to the new project in GCP and mapped example.com to it. At the step (5) where it said update your domain records, I realized that the A and AAAA records for the 2 projects were exactly the same.

This was confusing to me. What I realized is that GCP is doing some mapping to the correct project internally, it is not all a DNS thing.

To update the DNS records I just left the existing DNS records that I already had and added A and AAAA records for test.example.com with the same values as the existing records. Of course it took a wile for all of the DNS and GCP mapping to flow through.

Upvotes: 3

Alex Martelli
Alex Martelli

Reputation: 882751

The instruction in the docs apply to mapping an app to http://api.grape.com just as well as to mapping it to http://api.grape.com -- just don't skip point 5 in the instructions, since it says

If you want to serve your app on the www subdomain, skip the rest of this step and continue with step 6 in this list.

so I imagine you skipped that for your first part. You just need to type api in the Web Address field as shown in step 5!

Upvotes: 9

Related Questions