Why use Google Cloud DNS?
Using this service takes advantage of Google’s domain name system (DNS) infrastructure. Google Cloud DNS is production-quality, can handle high-volume DNS requests, has low-latency, and is secure. It especially makes sense to adopt Google Cloud DNS if your site is built on the Google Cloud Platform.
Before we being, we will assume that:
- You have a VM instance in the Google Compute Engine environment
- You have a domain registered with GoDaddy
Create a static IP address for your VM instance
Note down the IP address that was reserved for you.
Google Cloud DNS – create a new DNS Zone
From the left-hand menu navigate to NETWORKING > Network services > Cloud DNS
Click on Create zone
Configure your DNS zone. We will assume we are setting a DNS zone for
- Zone name: needs to be a unique name and the format is up to you. I prefer using the format
- DNS name: The domain you are setting the DNS zone for (e.g.
- DNSSEC: Off
- Click on the Create button
You will now be taken to the page listing out all the records for this zone. By default it will have a
NS and a
Now let’s create an
A record for our domain pointing to the static IP address we created in the previous step.
Click on Add record set
Enter your settings:
- DNS Name: of the form
.yourdomain.com.(note the leading and trailing dots)
- Resource Record Type: A
- TTL: 5
- TTL Unit: minutes
- IPv4 Address: the IP address you noted down from creating a static IP address
- Click on the Create button
Repeat the above steps for any other records you wish to configure – e.g.
MX records for mailservers or
CNAME records for subdomains.
Now take note of the provided
NS values for the next step. The values will look like:
ns-cloud-c1.googledomains.com. ns-cloud-c2.googledomains.com. ns-cloud-c3.googledomains.com. ns-cloud-c4.googledomains.com.
GoDaddy – point your domain’s nameserver to Google Cloud DNS
Log in to GoDaddy and go to your My Domains page.
Click on the three dots next to your domain and select Manage DNS
Scroll down to Nameservers
Click on the Change button
Choose your new nameserver type: Custom
Add the nameserver names that were listed in your
NS record. Keep in mind:
- Remove the
.at the end of each nameserver address. GoDaddy does not like it.
- There are fields for the first two entries. For additional entries, click on the Add Nameserver button.
Click on Save when done.
Let’s test whether everything worked. So far we have:
- Created a static IP address in the Google Cloud Platform
- Created a DNS Zone in the Google Cloud Platform
- Created an
Arecord pointing to the static IP address we created
- Configured our domain’s DNS settings in GoDaddy to point to Google’s nameservers
Open up a terminal on your machine.
nslookup yourdomain.com. If everything is OK, you’ll see something like the below. Ensure that the
Non-authoritative answer > Address value corresponds with the static IP that you created.
$ nslookup measurementcookbook.com Server: 126.96.36.199 Address: 188.8.131.52#53 Non-authoritative answer: Name: measurementcookbook.com Address: 184.108.40.206
If you don’t see this in your terminal, wait 2 minutes and try again. It can take some time for the changes on GoDaddy to propagate through to Google.
If you’re still not seeing the right results, retrace your steps above and ensuring that:
- You are using the correct static IP address in your
- You entered the correct nameserver addresses into GoDaddy’s nameserver settings for your domain