N10-009 Question 231
Single answerRecord types: Address (A), AAAA, Canonical name (CNAME), Mail exchange (MX), Text (TXT), Nameserver (NS), Pointer (PTR)A company is moving its public-facing website to a new cloud platform. The DNS administrator wants users to continue accessing the site with the existing name, www.example.com, but wants the flexibility to change the underlying host later without updating multiple records. The zone already contains a host record for web-prod.cloudprovider.net that points to the current server IP address. Which DNS record should the administrator create for www.example.com to meet this requirement?
- A
Create an A record for www.example.com that points directly to the current IPv4 address
- B
Create a CNAME record for www.example.com that points to web-prod.cloudprovider.net
- C
Create an MX record for www.example.com that points to web-prod.cloudprovider.net
- D
Create a PTR record for www.example.com that points to web-prod.cloudprovider.net
Show answer and explanation
Correct answer: B
Explanation
The best answer is the CNAME record because it allows www.example.com to function as an alias to another hostname, such as web-prod.cloudprovider.net. This supports easier administration when the underlying service location changes. By contrast, an A record maps directly to an IPv4 address and would require direct updates if the destination changes. MX records are only for email routing, and PTR records are for reverse DNS. This aligns with standard DNS behavior defined in core DNS RFCs, including RFC 1034 and RFC 1035, which describe canonical names, address records, mail exchange handling, and reverse lookup concepts. In practice, administrators commonly use CNAME records for service aliases such as www, while A and AAAA records are used for direct hostname-to-IP mappings.
- A. Incorrect.
This would work for reaching the current IPv4 address, but it does not best meet the requirement for flexibility. An A record maps a hostname directly to an IPv4 address. If the underlying host changes, the administrator would need to update the A record itself. The scenario specifically calls for an alias that can follow another hostname, which is what a CNAME provides.
- B. Correct.
Correct. A CNAME (Canonical Name) record creates an alias from one hostname to another hostname. In this scenario, www.example.com can point to web-prod.cloudprovider.net, allowing the administrator to update the target host's address record later without changing the alias record. This is a common approach for web services when administrators want to abstract the public name from the actual backend hostname.
- C. Incorrect.
This is incorrect because an MX (Mail Exchange) record is used to identify the mail server responsible for receiving email for a domain. It is not used to map a website hostname to another host for HTTP/HTTPS access. Someone might choose this if they confuse general service redirection with email-specific DNS routing.
- D. Incorrect.
This is incorrect because a PTR (Pointer) record is used for reverse DNS lookups, typically mapping an IP address back to a hostname. It is commonly used for validation, troubleshooting, and mail server reputation checks. It does not provide forward-name aliasing for users browsing to a website.