Noah K
Noah K

Reputation: 87

How do I host a Google Cloud Platform project on a subdomain for an existing site?

I am trying to set up a custom domain for a Google Cloud Project that I own. I want to map the project to the subdomain of a site that we already use. So, for example, I have an app that lives at https://docket-tracker.appspot.com/ and I want to host it at https://dockets.example.com/. We already use https://www.example.com/, https://example.com/, and several other subdomains on that domain.

I went through the documentation that Google gives to generate the DNS records that I need, and it tells me this:

Add the following DNS records with your domain registrar for example.com:
Type    Data                    Alias
A       216.239.32.21   
A       216.239.34.21   
A       216.239.36.21   
A       216.239.38.21   
AAAA    2001:4860:4802:32::15   
AAAA    2001:4860:4802:34::15   
AAAA    2001:4860:4802:36::15   
AAAA    2001:4860:4802:38::15   
CNAME   ghs.googlehosted.com    dockets 

DNS changes can take up to 24 hours to take effect.
Your SSL certificate will take several minutes to activate.

Notice on the first line that it specifies example.com. Why is it telling me to put all these records on the top level domain? I don't want to have example.com go to any of these, I want to have dockets.example.com go to these. How do I host on dockets.example.com without messing with the A records I already use at the top level domain?

In case it's helpful, the DNS we are using is Pair

Edit: I think the source of my confusion can be summed up in like so. When creating a custom domain, I unselect the option to map to any domain/subdomain other than dockets.example.com. Yet I am still told to add a bunch of A/AAAA records changing the naked domain. Why does it tell me to do this? My inclination is to ignore it and only use the CNAME provided. DNS records it gives me My inclination is further reinforced by the fact that those A records disappear when I navigate to App Engine -> Settings -> Custom Domains. DNS records it gives me without A records So I suppose my question is: can I ignore those A records and only use the CNAME, and if not, what should I do?

Upvotes: 0

Views: 296

Answers (1)

John Hanley
John Hanley

Reputation: 81386

Google recommends mapping the DNS Root Zone (example.com) in addition to any subdomains that you intend to use. This is a suggestion, not a requirement.

In the event, you only want to map a subdomain (dockets.example.com) then only create an App Engine custom domain for that domain (dockets.example.com).

Upvotes: 1

Related Questions