The nslookup command is the simplest way to it find out. The nslookup can be run at the terminal or command line using the following syntax.
Let’s try to find the IP address of website www.yahoo.com
mymac:~ mvohra$ nslookup www.yahoo.com
www.yahoo.com canonical name = fp3.wg1.b.yahoo.com.
fp3.wg1.b.yahoo.com canonical name = any-fp3-lfb.wa1.b.yahoo.com.
any-fp3-lfb.wa1.b.yahoo.com canonical name = any-fp3-real.wa1.b.yahoo.com.
The nslookup with use the local DNS server to resolve the IP address for the specified hostname.
The IP address highlighted in bold above are the IP address for the hostname (www.yahoo.com). In this case 2 servers have the same canonical name www.yahoo.com.<!>