I'm pretty new to the world of computer science and ran into something that I'm having trouble understanding:
I have this homework assignment asking me to list the IP address produced by using the nslookup command for certain domains. The actual assignment is super easy, but while I was doing it, I realized that when I type "nslookup www.ibm.com" I get a different IP address that when I type "nslookup ibm.com" When I navigated to those IP addresses in Chrome, the "ibm.com" took me straight to the IBM website while the "www.ibm.com" IP address told me it was an invalid URL.
My results from "nslookup www.ibm.com" were:
Non-authoritative answer: Name: e2874.x.akamaiedge.net Address: 18.104.22.168 Aliases: www.ibm.com www.ibm.com.cs186.net www.ibm.com.edgekey.net www.ibm.com.edgekey.net.globalredir.akadns.net
The results from "nslookup ibm.com" were:
Non-authoritative answer: Name: ibm.com Address: 22.214.171.124
According to whois, the IP address I got with "nslookup www.ibm.com" is a Polish server belonging to Akamai. (Wikipedia says they provide cloud services. IBM is listed as a customer, so I'm pretty sure this isn't exactly a startling discovery.)
What I'm trying to understand is why "nslookup www.ibm.com" and "nslookup ibm.com" produce different IP addresses. I asked on /r/askcomputerscience and was informed that from a DNS perspective, the "www" part doesn't mean a whole lot.
There is also this similar question here on Server Fault, but the answer seems like it might be specific to Google. The question was "Why do nslookup result differ when adding www?" and the answer was "Because google has different DNS records for the root zone and the www zone." Does this answer apply here as well? If so, why have different records for the root zone and the www zone?