220-1101 Question 111
Single answerCanonical Name (CNAME)A small company migrated its customer portal to a cloud service. Users are told to access the site with the friendly name portal.company.com, but the cloud provider says the service's actual host name is app-447.hostprovider.net and its IP address may change during maintenance. The technician wants portal.company.com to continue working even if the provider changes the IP address. Which DNS record should the technician create for portal.company.com?
- A
Create an A record for portal.company.com that points directly to the current IP address of app-447.hostprovider.net
- B
Create a CNAME record for portal.company.com that points to app-447.hostprovider.net
- C
Create an MX record for portal.company.com that points to app-447.hostprovider.net
- D
Create a PTR record for portal.company.com that points to app-447.hostprovider.net
Show answer and explanation
Correct answer: B
Explanation
The best answer is to create a CNAME record for portal.company.com that points to app-447.hostprovider.net. A CNAME is specifically designed to make one DNS name an alias of another DNS name. This is useful when the target system is managed by a third party and its IP address may change over time. In that case, the alias continues to work as long as the provider updates the A or AAAA records for its canonical host name. By contrast, an A record hard-codes the current IP address and requires manual updates if the address changes. MX records are for email routing, and PTR records are for reverse DNS lookups. This aligns with standard DNS behavior documented in common DNS administration references and best practices: use CNAME records for aliases to other host names, and use A/AAAA records when directly mapping a name to a fixed IP address.
- A. Incorrect.
This is incorrect. An A record maps a host name directly to an IPv4 address. While it may work temporarily, it does not meet the scenario requirement that the provider's IP address can change. If the cloud provider changes the IP, the technician would have to manually update the A record, which defeats the goal of using a DNS alias that tracks the provider's host name.
- B. Correct.
This is correct. A CNAME (Canonical Name) record creates an alias from portal.company.com to the provider's canonical host name, app-447.hostprovider.net. When DNS resolves the alias, it then looks up the target host's A or AAAA record. This is the appropriate choice when you want one name to follow another host name whose underlying IP address may change.
- C. Incorrect.
This is incorrect. An MX record is used for mail exchange routing and tells other mail servers where to deliver email for a domain. It is not used to make a web host name act as an alias for another host. Someone might choose this if they confuse different DNS record types, but MX records are unrelated to web portal name resolution.
- D. Incorrect.
This is incorrect. A PTR record is used for reverse DNS, mapping an IP address back to a host name. It does not create a forward lookup alias for users typing portal.company.com into a browser. This is a common misconception because PTR records also involve host names, but they serve the opposite lookup direction.