Learn how to properly configure Cloud DNS records for home.mydomain.com, mydomain.com, and www.mydomain.com to point to your Google Cloud load balancer’s IP address. Get a detailed explanation from a certified Google Associate Cloud Engineer.
Table of Contents
Question
You are configuring Cloud DNS. You want to create DNS records to point home.mydomain.com, mydomain.com, and www.mydomain.com to the IP address of your Google Cloud load balancer. What should you do?
A. Create one CNAME record to point mydomain.com to the load balancer, and create two A records to point WWW and HOME to mydomain.com respectively.
B. Create one CNAME record to point mydomain.com to the load balancer, and create two AAAA records to point WWW and HOME to mydomain.com respectively.
C. Create one A record to point mydomain.com to the load balancer, and create two CNAME records to point WWW and HOME to mydomain.com respectively.
D. Create one A record to point mydomain.com to the load balancer, and create two NS records to point WWW and HOME to mydomain.com respectively.
Answer
C. Create one A record to point mydomain.com to the load balancer, and create two CNAME records to point WWW and HOME to mydomain.com respectively.
Explanation
The correct answer is C. Create one A record to point mydomain.com to the load balancer, and create two CNAME records to point WWW and HOME to mydomain.com respectively.
To properly configure Cloud DNS for your Google Cloud load balancer:
- Create an A record for mydomain.com that points directly to the IP address of your load balancer. This ensures that mydomain.com resolves to the correct IP address.
- Create two CNAME records, one for www.mydomain.com and another for home.mydomain.com. These CNAME records should point to mydomain.com, which in turn points to the load balancer’s IP address.
CNAME records are used for subdomains (like www and home) to reference another domain name instead of an IP address. By pointing the subdomains to mydomain.com using CNAME records, you ensure that they inherit any changes made to the A record of mydomain.com.
This configuration provides a clean and maintainable setup, as you only need to update the A record for mydomain.com if the load balancer’s IP address changes, and the subdomains will automatically reflect those changes.
Google Associate Cloud Engineer certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Google Associate Cloud Engineer exam and earn Google Associate Cloud Engineer certification.