Google Cloud DNS: The Definitive Guide 
In this article you will learn about Google Cloud DNS and How to set up Google Cloud DNS on your website.
What is DNS or domain name system ?
What is Google Cloud DNS?
How Google Cloud DNS Work?
DNS Resolver: DNS resolver which you might install in your Windows or Routers Network settings, e.g. google public DNS (188.8.131.52), Open DNS(184.108.40.206) Cloudflare Public DNS(220.127.116.11), your ISP DNS etc.
When you are trying open a website on your browser, DNS resolver job is to track down the IP records and give it back to you.
DNS Root Nameserver: There are only 13 root nameserver around the world. When the resolver sends a query to DNS root nameserver, the root server then responds to the resolver with the IP address of a Top Level Domain (TLD) DNS server (such as .com or .net or .org), which stores the information for its domains. When searching for example.net, our request is pointed toward the .net TLD nameserver.
DNS TLD Nameserver: The resolver then makes a request to the .net TLD. The TLD server then responds with the IP address of the Google Cloud DNS nameserver, example.net.
You can update TLD nameserver records of your domain by changing nameserver records from your domain registrar website.
Google Cloud DNS: Lastly the resolver makes a request to Google Cloud DNS. And Google Cloud DNS responds with the IP address of your website server.
This is how Google Cloud DNS works. I hope you understand if not then please place a comment in the comment section below.
Why Google Cloud DNS?
Now you’re thinking why bother using Google Cloud DNS. Yes you are right you don’t need to use it but you should use a fast DNS service for your website. Fast and retaible DNS is good for your site because it decreases latency and improve SEO of your website. Google Cloud DNS is one of the best DNS Service Provider in this industry. Others are AWS cloud DNS, Cloudflare DNS etc.
Google Cloud DNS Pricing.
Google Cloud DNS will charge you per month for per zone (per domain name), and you also pay for queries against your zones.
Here the price table of Google Cloud DNS:
How much it will cost to host a website using Google Cloud DNS?
GCP Cloud DNS price is base on two different factors, the numbers of zones and the DNS queries (per month).
You just need one zone for one website. If you want to set up DNS for 5 different domains then you will need 5 zone records. And the DNS queries are proportional to your website monthly visitors.
Here is some typical examples of DNS pricing.
For a website which has 200000 monthly visitors, Google Cloud DNS cost will be around $0.28 per month.
Here is an example of a website which has 200000 monthly visitors and also enable personalize CDN service.
E.g. Domain name: example.com
E.g. CDN name cdn.example.com
Then for every page visit you will have two DNS queries. Your Google Cloud DNS price will be $0.36 per month.
Want Exclusive Tutorials?
How to set up Google Cloud DNS?
To set up GCP DNS, Login to your Google Cloud Console and follow these steps below.
- Create a new DNS zone on Google Cloud.
- Update your TLD Nameserver for your domain registrar website.
- Find and copy your web server IP address.
- Add your IP address and other records to GCP.
Let’s get started.
Create a New DNS Zone on Google Cloud Platform:
Click on the hamburger menu in the upper left-hand corner of your Google Cloud Platform dashboard. After that navigate to NETWORKING >> NETWORK SERVICES >> CLOUD DNS.
Then click on “Create zone”.
After that select “Public” from Zone type field. Then type a Zone name. Place your Domain name on the DNS name field. Next click on Create button.
Those are the nameservers which you have to update or modify from your domain registrar website. Copy these NS records one by one.
Update Your TLD Nameserver.
As you already know, that your domain registrar website is connected to the TLD Nameserver. When you Change the Nameserver records from your domain registrar site, TLD server also get updated, BUT it can take up to 48 hours.
Here I am showing you how to update your NS records from GoDaddy and Namecheap website. If your domain registrar is different from those two, then place a comment or search it on Google.
If you register your domain from GoDaddy, then follow the steps below:
Login to your GoDaddy account. Then navigate to Domain Manager >> DNS >> Manage Zones.
Scroll down, Then click on the “Change” button on the Nameservers field.
After that, Select “Custom” from the “Choose your new nameserver type” section. Then, In the Nameserver field place the NS records which you copied earlier.
If you register your domain from Namecheap, then follow the steps below:
Login to you Namecheap account. Then, navigate to Domain list >> Domain. Next Select Custom DNS from Nameserver section.
Select custom DNS and place the nameserver records which you copied from Google Cloud DNS.
Copy your web server IP address:
Many people do not know where to find their web server IP address, Do not worry it happens when you are new in this field. Follow the steps below to Find your web server IP Address.
If you don’t have any web server on Google Cloud, then follow any of those two posts:
- WordPress on Google Cloud: The Definitive Guide
- WordPress Multisite on Google Cloud: A to Z Installation Guide
If you are hosting your website on manage hosting providers such as GoDaddy, a2hosting, Siteground, Namecheap, Bluehost e.t.c, then login to your cPanel.
And copy your web server IP address from Dedicated IP Address field.
If you are hosting your website on Google Cloud Platform, then follow the steps below.
Click on the hamburger menu in the upper left-hand corner of your Google Cloud Platform dashboard. Then navigate to Compute Engine >> VM Instances.
The External IP is your web server IP address. Copy the External IP.
Add IP and others records to Google Cloud DNS:
Now go back to Google Cloud DNS. Click on the “Add record set”.
Select “A” from the “Resource record type”. Then leave the “DNS name” field empty. Place your web server IP address on the “IPv4 address” field. Lastly click on “Create”.
Just like the previous step, again click on the “Add record set”. Then type “WWW” in the DNS name field. Place your web server IP on IPv4 address field. Then click on create.
This step is completely optional, only follow it if you have email mail server.
Select MX from Resource record type field. Then replace the mx1.privateemail.com and mx2.privateemail.com to your email server. Lastly leave the DNS name section blank and click on “Create”.
Here is an image of what looks like when you successfully configure your DNS records.
Now it is your time!
I tried my best to provide you a complete tutorial on Google Cloud DNS. I hope you liked it.
If you need help just drop a comment.
If you benefited from this tutorial, and would like to support my work, please like my Facebook page.