10

A question about Google Cloud DNS: what happens when you create two Google Cloud projects (e.g., ProjectA and ProjectB), each with a public managed DNS zone with the same top-level domain (e.g., example.com)?

More precisely: will the sub-domains of both (e.g., a.example.com in ProjectA and b.example.com in ProjectB) both be resolvable by clients?

And more exotically: what would happen if both projects would define the same subdomain (e.g., an A record for overlapping.example.com)?

I've read Google's documentation on overlapping zones, but that does not seem to give an answer to these questions.

Any experiences?

DuXati
  • 335
  • 2
  • 10

2 Answers2

17

If you have a public domain managed in one Project and you want to setup subdomain in a different Project then you can follow this:

Let's have Project A that contains Zone X for domain.com that is registered with Google's NS servers ns-cloud-a{1..4}.googledomains.com.

Then let's have Project B that contains Zone Y for dev.domain.com that is registered with Google's NS servers ns-cloud-b{1..4}.googledomains.com.

In order to make domain names from Zone Y public, create NS record for dev.domain.com that points to ns-cloud-b{1..4}.googledomains.com in the Zone X.

jtyr
  • 326
  • 2
  • 7
  • This is very useful, specially if you want to use different service accounts to manage DNS and want the subdomain SA isolated from changing main DNS. – Eladio Mora Oct 27 '20 at 17:09
  • Thank you it work for me but Be patient it can take some time, in my case it take more or less 3 hours. – Mickael Rahmine May 31 '23 at 09:10
-1

TLDR

A parent domain project needs an NS record for the subdomain, configured with subdomain name server.

jws
  • 2,171
  • 19
  • 30