How to Find the IP Address of a Website
Every website has at least one associated IP address that it uses to communicate with devices on a network. Because remembering these random strings of numbers would be difficult, developers created the domain name system (DNS). DNS resolves domain names (like WhatIsMyIP.com) to numerical IP addresses, which computers then use to communicate. However, as a user, you may want to find the IP address of a website in addition to knowing the domain name. By using either the ping command, the nslookup command, or the DNS lookup tool, you can easily find the IP address of a website in just a few steps.
Using the ping command
You can find the IP address of any website through the command prompt by using the ping command. The ping command checks the response time for a connection, which indicates the connection’s reliability, but it also returns the IP address of a website.
To find the IP address of a website with the ping command, open the command prompt and type:
Below, you can see the pinging results for Google.com's IP address.
For Mac users, the same command can be performed in Terminal. Open terminal and enter the same command as above (ping examplewebsite.com). The results are shown below.
As seen in this example, the IPv4 address of the Google.com website is 184.108.40.206. The IPv6 address is 2607:f8b0:4004:815::200e.
Using the nslookup command
Another way to check the IP address of a website using a command line tool is with the nslookup command. Most operating systems, whether they be Microsoft Windows, MacOS, Linux, or another system, provide the nslookup tool as it’s specifically intended for looking up IP addresses.
The nslookup tool provides more information to users than the ping command, though both work to find a website’s IP address. To find the IP address of a website with the nslookup command, open the command prompt and type:
Below is an example of the command run on Google.com in the Microsoft Windows system.
The line immediately below the Server line is the IP address of the DNS server that provided the information for Google.com, which is 2001:578:3f::30. The Addresses line shows an IPv6 address for Google.com, which is 2607.f8b0:4004:815::200e.
Mac users can open Terminal to run the same command. Below, you can see the nslookup results for Google.com through Terminal.
With this command, we can see that an IPv4 address is shown below the Addresses line for Google.com – 220.127.116.11.
Using the DNS lookup tool
Both the ping command and nslookup command are options for finding the IP address of a website. However, the simplest way to determine the IP address of a website is through the DNS lookup tool.
Go to the DNS lookup tool, type the website URL into the text entry, and click Lookup. Below, you can see the results for Google.com.
Note that the search yielded a list of IPv4 addresses that differ from the IPs shown using other methods. This is because many large companies have more than one IP address associated with a Fully Qualified Domain Name (FQDN), which Google.com is. When a system on the Internet looks up Google.com, the IP address returned by Google’s DNS servers may not be the same each time because there are several equally valid IP addresses for the same domain.
Many companies with publicly accessible websites use a round-robin DNS technique for associating IP addresses with their web servers. If a high volume of users are accessing their servers simultaneously, they won’t all be accessing the same server. Therefore, the DNS servers cycle through a list of IP addresses that are returned for DNS queries for an IP address for a web server in order to accurately determine how to find a server's IP address.
Understanding the difference in IPv4 and IPv6 results
When receiving results for an IP address search, it’s possible to receive one of two kinds of IP addresses: IPv4 addresses or IPv6 addresses. It doesn't matter what IP you're searching. Whether it's a Windows computer, a Mac, or some other device altogether like an iPhone. In some cases, both are available; for example, on the WhatIsMyIP.com homepage, you can check public IPv4 and IPv6 addresses as they are both displayed when available.
But why are there two different IP addresses displayed for the same search, like in the Google.com queries above? What is Google's IP address?
In truth, there is no difference between the two in terms of how they function for a website. IPv6 is a newer version of the Internet Protocol, created to avoid IP exhaustion with IPv4 addresses. Because the original IPv4 address system lacked enough IP address combinations for all the devices accessing the Internet, the Internet Engineering Task Force (IETF) created the longer, more expansive IPv6 address system. Therefore, both are Google's IP address. Once you know how to get the IP address of a server, you can test this with various sites and servers to see what results you retrieve.
Many websites' IPs are now accessible using IPv6, though IPv4 continues to be widely used. Most people are more familiar with the IPv4 addresses. However, many networking devices are configured with both IPv4 and IPv6 connectivity capabilities. Internet service providers can process IPv4 and IPv6 data traffic simultaneously.
If you go to find the IP of a website or find server IP addresses, and you get an IPv4 address with an IP address lookup but then get an IPv6 address, neither result is wrong. They are both IP addresses assigned to the particular site you’re querying.