ASSOCIATE-CLOUD-ENGINEER practice question 35 of 35

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?

Full set: 332 questions
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 lo 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. Correct answer
D: Create one A record to point mydomain.com lo the load balancer, and create two NS records to point WWW and HOME to mydomain.com respectively.
Correct 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 most appropriate configuration is to create an A record for the apex domain (mydomain.com) to point directly to the load balancer's IPv4 address. An A record is required for the apex domain because a CNAME record cannot be used at the zone apex (the root of a domain), as it must coexist with other records like SOA and NS. For the subdomains (www.mydomain.com and home.mydomain.com), CNAME records should be created to point to the apex domain (mydomain.com). This approach is efficient because if the load balancer's IP address changes, only the single A record for mydomain.com needs to be updated, and the subdomains will automatically resolve to the new IP.

Why Incorrect

A. A CNAME record cannot be used for the zone apex (mydomain.com). Additionally, A records map hostnames to IP addresses, not to other hostnames.
B. A CNAME record cannot be used for the zone apex. AAAA records are for mapping to IPv6 addresses, not for aliasing one hostname to another.
D. NS (Name Server) records are used to delegate a DNS zone to a set of authoritative name servers, not to point a hostname to an IP address or another hostname.

References

1. Google Cloud Documentation

Cloud DNS

"Add

modify

and delete records": Under the section for "CNAME record

" the documentation states

"A CNAME record cannot exist at the zone apex." This directly invalidates options A and B. The documentation also defines an "A record" as mapping a domain name to an IPv4 address

which is the correct use case for the apex domain in this scenario.

2. Google Cloud Documentation

Cloud DNS

"Supported DNS record types": This page details the function of each record type. It confirms that A records are for IPv4 addresses

CNAMEs are for canonical names (aliases)

and NS records are for name server delegation

supporting the reasoning for selecting C and rejecting D.

3. Internet Engineering Task Force (IETF)

RFC 1034

"DOMAIN NAMES - CONCEPTS AND FACILITIES"

Section 3.6.2: This foundational document for DNS specifies the CNAME rule: "If a CNAME RR is present at a node

no other data should be present". Since the zone apex must have SOA and NS records

a CNAME cannot be placed there. This provides the technical basis for why options A and B are incorrect.

4. Internet Engineering Task Force (IETF)

RFC 1912

"Common DNS Operational and Configuration Errors"

Section 2.4: This document clarifies common mistakes and states

"A CNAME record is not allowed to coexist with any other data. In other words

if suzy.podunk.xx is an alias for sue.podunk.xx

you can't also have an MX record for suzy.podunk.xx." This reinforces the rule against using a CNAME at the zone apex.

Scroll to Top