Update your domain's name servers

After you create a managed zone, you must change the name servers that are associated with your domain registration to point to the Cloud DNS name servers. The process differs by domain registrar provider. Consult the documentation for your provider to determine how to make the name server change.

If you don't already have a domain name, you can use Cloud Domains to register a domain. If you already have a domain registered by using Cloud Domains, see Configure DNS for the domain in the Cloud Domains documentation.

Look up your Cloud DNS name servers

For Cloud DNS to work, you must determine the name servers that have been associated with your managed zone and verify that they match the name servers for your domain. Different managed zones have different name servers.

Console

  1. In the Google Cloud console, go to the Cloud DNS zones page.

    Go to Cloud DNS zones

  2. Under Zone name, select the name of your managed zone.

  3. On the Zone details page, click Registrar setup at the top right of the page.

gcloud

To return the list of name servers that are configured to serve DNS queries for your zone, run the dns managed-zones describe command:

gcloud dns managed-zones describe ZONE_NAME

Replace ZONE_NAME with the name of the managed zone for which you want to return a list of name servers.

Find the IP addresses of your name servers

The IP addresses of your Cloud DNS name servers change, and may be different for users in different geographic locations.

To find the IP addresses for the name servers in the a name server shard, run the following command:

  dig ns-cloud-a1.googledomains.com +short
  dig ns-cloud-a2.googledomains.com +short
  dig ns-cloud-a3.googledomains.com +short
  dig ns-cloud-a4.googledomains.com +short

For private zones, you can't query name servers on the public internet. Therefore, it's not necessary to find their IP addresses.

To find all the IP address ranges used by Google Cloud, see Where can I find Compute Engine IP ranges?

Change your domain registrar's name servers for your domain

Now that you have the list of Cloud DNS name servers hosting your managed zone, use your domain registrar to update the name servers for your domain. Your domain registrar might be Cloud Domains or a third-party registrar.

Typically, you must provide at least two Cloud DNS name servers to the domain registrar. To benefit from Cloud DNS's high availability, you must use all the name servers.

After changing your domain registrar's name servers, it can take a while for resolver traffic to be directed to your new Cloud DNS name servers. Resolvers could continue to use your old name servers until the TTL on the old NS records expire.

Verify your name servers

Verify that the name servers for the domain match the name servers listed in the Cloud DNS zone.

To look up name servers that are in use, run the dig command:

dig -t NS myzone.example.com.

What's next