When I search something on google.com, I see interaction with the following IP address: 172.217.7.132
But when I attempt to reverse lookup the ip address, I get iad30s08-in-f132.1e100.net.
and iad30s08-in-f4.1e100.net.
, not google.com
.
What do I need to do in order to correctly identify that this IP address is resolved by google.com
.
EDIT
Clarifying the question: My problem is not specific to google.com
. I want to programmatically/logically arrive at google.com
because that's what my browser requested for.
Same problem exists in the case of amazon: The IP address it resolves to, on reverseDNS gives me: server-13-32-167-140.sea19.r.cloudfront.net.
instead of amazon.com
Code for performing reverse lookup:
In [1]: def reverse_lookup(ip_address):
...: from dns import reversename, resolver
...: domain_address = reversename.from_address(ip_address)
...: return [answer.to_text() for answer in resolver.query(domain_address, "PTR")]