As we know google has more than one IP addresses. If we use the website https://toolbox.googleapps.com/apps/dig/#A/google.com@8.8.8.8 it results more than one IP addresses of google.
If I run the following command then the scenario is different:
gyan@localhost:~/codes/java/net$ dig google.com
; <<>> DiG 9.10.3-P4-Ubuntu <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11777
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 269 IN A 216.58.220.46
;; Query time: 0 msec
;; SERVER: 10.100.171.1#53(10.100.171.1)
;; WHEN: Fri Nov 04 16:18:07 IST 2016
;; MSG SIZE rcvd: 55
gyan@localhost:~/codes/java/net$
Only one IP address returned which is not same as what returned by above website. This IP address is also changing time to time.
But if I run dig command for amazon.com:
gyan@localhost:~/codes/java/net$ dig amazon.com
; <<>> DiG 9.10.3-P4-Ubuntu <<>> amazon.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55090
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;amazon.com. IN A
;; ANSWER SECTION:
amazon.com. 34 IN A 54.239.26.128
amazon.com. 34 IN A 54.239.17.7
amazon.com. 34 IN A 54.239.25.192
amazon.com. 34 IN A 54.239.25.208
amazon.com. 34 IN A 54.239.25.200
amazon.com. 34 IN A 54.239.17.6
;; Query time: 74 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Fri Nov 04 16:23:17 IST 2016
;; MSG SIZE rcvd: 135
gyan@localhost:~/codes/java/net$
These 6 IP addresses never change for amazon.com. And the website https://toolbox.googleapps.com/apps/dig/#A/amazon.com@8.8.8.8 also returns same 6 IP addresses.
My doubt is how DNS lookup for the google.com is different from the amazon.com? Why google results in just one record, not more than one like amazon?