Domain Name System(DNS) is a distributed database which lets you store IP addresses and other data and looks them up by names.
In this tutorial we point our domain registerd in Google Domains to Google Cloud DNS
Get your Professional Google Cloud Architect certificate with this easy to learn course now.
Prerequisites
- Have a Compute Engine Instance running
- Reserved the External IP address of your VM Instance.
- For setting up Compute Engine, see the Setting up Compute Engine Instance
Commonly used DNS Records
- A Record – IPv4 address, maps IP of the host with a domain.
- AAAA Record – IPv6 address, mainly used in HTTP(S), SSL Proxy, and TCP Proxy Load balancing.
- CNAME – Alias for one name to another (www.domain.com, points to domain.com)
- MX – Manages where emails should be delivered.
- TXT – Any text content, like domain owner verification text or something like that
Why use Google Cloud DNS?
- To have everything in one place for your project.
- Managed by Google and it’s fast, reliable and secure with low-latency.
- Uses Anycast (requests are rooted to nearest location).
- Low Pricing (0.2/month per zone).
How to point your domain to Google Cloud DNS?
Go to Network Services >> Cloud DNS in your GCP Console
Click Create Zone
Choose Public for the Zone type.
Enter your desired name (recommended to use your domain name without extension .com or .co.au) for the Zone name
Enter your domain name for the DNS name. For example, domain.com.
Keep the Off setting selected for DNSSEC.
Click Create.
Create new A record
Once the DNS zone is created you will be provided with default four NS records and SOA records.
Now you can create a new record to point your domain to your VM Instance’s external IP address.
- Click Add record set.
- Select Resource Record Type to “A”.
- IPv4 Address with the IP address of your instance that you have reserved earlier.
- Leave everything to default.
- Click create
Create new CNAME record
- Enter DNS name “www”.
- Select Resource Record Type to “CNAME”.
- Canonical name as your domain name followed by a period (domain.com.).
- Leave everything to default.
- Click create
Update your domain name servers
Login to your domain registrar (for example Google Domains) and go to DNS settings.
Select Use custom name servers.
Add the four NS records provided to you when you created the zone for your domain.
Save your settings.
Now your domain name is pointed to Google Cloud VM Instance and uses Google Cloud DNS.
Leave your Reply