Which DNS record — OS, DBMS & Networks Aptitude Question
Which DNS record: Which DNS record type maps a host name to an IPv4 address? Answer and worked solution on CodeKairo.
- Topic: OS, DBMS & Networks
- Section: Programming MCQs
- Difficulty: Easy
- Time target: 45 seconds
Question
Which DNS record type maps a host name to an IPv4 address?
Options
- A
- CNAME
- MX
- NS
Show the answer and the worked solution
Correct answer: A. A
Worked solution
- CNAME makes a name an alias for another name, MX names the mail servers for a domain, and NS names its authoritative name servers.
- The record carrying a 32-bit IPv4 address for a host name is the A record; its IPv6 counterpart is AAAA.
Answer: A.
The idea
Resolution often follows a chain: a CNAME leads to another name, which must itself resolve to an A or AAAA record before a connection can be made.
Shortcut. A stands for address (IPv4) and AAAA for the four-times-longer IPv6 address; CNAME aliases, MX names mail servers and NS names name servers.
Common trap. "CNAME" also starts from a host name, but it maps that name to another name, never to an IP address.