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 questionsThe 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.
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.
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.
Keep practicing
Take the free ASSOCIATE-CLOUD-ENGINEER practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other ASSOCIATE-CLOUD-ENGINEER practice questions
- Question 1You need to verify that a Google Cloud Platform service account was created at a particul…
- Question 2You are building a new version of an application hosted in an App Engine environment. You…
- Question 3You need to create a new billing account and then link it with an existing Google Cloud P…
- Question 4You want to configure 10 Compute Engine instances for availability when maintenance occur…
- Question 5You need to create a custom VPC with a single subnet. The subnet’s range must be as large…
- Question 6You significantly changed a complex Deployment Manager template and want to confirm that …
