In the following snippet you can find out how to use the InetAddress class to obtain the ip of the server where a domain is hosted along with the DNS information. Using this class you’ll obtain only the technical DNS details(name server, SOA & MX records), not the emails or the names of the domain owners.
Continue reading