Question 1
Consider the domain names example.com and cs.example.com. Which of the following best describes the hierarchy of these domain names?
Main Solution
The correct answer is D.
Domain name hierarchy works from right to left, with the rightmost label being the top-level domain (TLD). In the domain name cs.example.com:
.comis the top-level domain (TLD).example.comis a second-level domain — it is a subdomain of.com.cs.example.comis a subdomain ofexample.com, adding the labelcsto the left ofexample.com.
Therefore, cs.example.com is a subdomain of example.com, which is itself a subdomain of the top-level domain .com. This matches option D exactly.
Teacher Explanation
Students should understand that DNS hierarchy is read right-to-left: TLD → second-level domain → subdomain(s). The label added to the left of a domain name creates a subdomain of that domain, not the other way around. cs.example.com is subordinate to example.com, not the reverse.
Education Coach Advice
On AP CSP, remember: domain hierarchy goes right to left. The TLD is always the rightmost segment (e.g., .com, .org). Each label added to the left creates a subdomain of everything to its right. A longer domain name (more labels) is always a subdomain of any shorter version that forms its right-hand suffix.
Traps
The most common trap is option B, which reverses the parent-child relationship — incorrectly claiming example.com is a subdomain of cs.example.com. Students who read domain names left-to-right (as they would a file path) may think the shorter name is somehow contained within the longer one. Options A and C introduce .cs as a TLD, which is incorrect; .cs is simply a label prefix, not a TLD.
Answer images


