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 create and register a new domain name at Google Domains, or you can use a third-party domain name registrar.
If you are using Google Domains, follow these instructions to update your domain's name servers:
- To update the name servers for your domain, go to Google Domains.
- Click the domain that you have set up. Alternatively, you can click the Manage link for that domain.
- On the left navigation menu, click DNS.
- Select Use custom name servers.
- Enter the first
NSrecord that you copied from your Zone details page, for example,
ns1.googledomains.com, into the Name server field.
- To add additional name servers, click add until you have updated all four name servers on your Google Domains DNS page.
- Click Save.
For more information about DNS concepts, see the DNS Overview page.
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.
To determine your name servers in the Cloud Console:
- Go to the Cloud DNS page
- Under Zone Name, select the name of your managed zone.
- On the Zone details screen, click Registrar Setup at the far right of the screen.
This command returns the list of name servers that are configured to serve DNS queries for your zone.
gcloud dns managed-zones describe zone-name
Replace the following command option:
- zone-name is the name of the managed zone for which you want to return a list of name servers.
Find the IP addresses of your Cloud DNS 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,
enter 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. Thus, it's not necessary to find their IP addresses.
To find all of the IP address ranges used by Google Cloud, see Where can I find Compute Engine IP ranges?
Verify 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 currently in use, you can use
dig -t NS myzone.example.com.
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, update the name servers for your domain with your domain registrar. Your domain registrar might be Google 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 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.