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 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.
- In the Name server field, enter the first NS record that you copied
from your Zone details page, for example,
- To add additional name servers, click add Add until you have updated all four name servers on your Google Domains DNS page.
- Click Save.
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.
In the Cloud Console, go to the Cloud DNS zones page.
Under Zone name, select the name of your managed zone.
On the Zone details page, click Registrar setup at the top right of the page.
To return the list of name servers that are configured to serve
DNS queries for your zone, run the
dns managed-zones describe
gcloud dns managed-zones describe ZONE_NAME
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?
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 currently in use, run the
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, use your domain registrar to update the name servers for your domain. Your domain registrar might be Google Domains, 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.
- To find solutions for common issues that you might encounter when using Cloud DNS, see Troubleshooting.
- To get an overview of Cloud DNS, see Cloud DNS overview.