Google Cloud Associate Cloud Engineer — Question 183
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?
Answer options
- 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.
Correct answer: C
Explanation
The correct answer is C, as an A record is used to point a domain directly to an IP address, which is needed for mydomain.com to link to the load balancer. CNAME records are appropriate for aliasing subdomains like WWW and HOME to mydomain.com, ensuring they resolve correctly to the same IP. Options A and B incorrectly use CNAME and AAAA records, while option D incorrectly employs NS records, which are meant for delegating domains, not for pointing to IP addresses.