Multiple DNS answers for same domain eg google.com -- what does it mean?

Solution 1:

It is round robin. You see all 4 when you dig it, because dig asks the DNS server to return all records for that name.

Solution 2:

dig google.com returns only 1 ANSWER (EDIT: This is in my case but can be different depending on where you are located - thanks to MarkM comment below), the 4 other you see are in Authority section or Additional sections and they are the Name Servers names and IPs and not google.com IP. google.com IP is in Answer section: 64.233.163.104:

;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4

So 1 ANSWER, 4 AUTHORITY and 4 ADDITIONAL:

;; QUESTION SECTION:
;google.com.            IN    A

;; ANSWER SECTION:
google.com.        300    IN    A    64.233.163.104

;; AUTHORITY SECTION:
google.com.        137782    IN    NS    ns1.google.com.
google.com.        137782    IN    NS    ns4.google.com.
google.com.        137782    IN    NS    ns3.google.com.
google.com.        137782    IN    NS    ns2.google.com.

;; ADDITIONAL SECTION:
ns1.google.com.        83943    IN    A    216.239.32.10
ns2.google.com.        47822    IN    A    216.239.34.10
ns3.google.com.        47822    IN    A    216.239.36.10
ns4.google.com.        47822    IN    A    216.239.38.10

Solution 3:

It means that the name google.com resolves to 4 different ip addresses. It actually resolves to many more, but you got 4 of them. For all practical purposes the 4 ips are interchangeable. However, whether a browser will try them in sequence until one works is wholly dependent on the browser. And some browsers cache results themselves, and are known to ignore ttl, so be careful trying to predict what a browser will do.