Every website has at least one IP address connected to its domain name. For example, the website Facebook has, among others, the IP address 157.240.214.35
connected to the domain name www.facebook.com
.
When you enter a URL in your browser, it will first determine the domain name of that URL. It then looks up the IP address and connects to the server with this IP. Once connected, it fetches the website's source code to display the page.
These IP addresses are configured in the Domain Name System (DNS) as A and AAAA records. But how can you look up those IP addresses? That depends on the operating system you are using. Windows, Linux and Mac all have a different way of finding the IPv4 and IPv6 addresses. The sections below list the instructions for each operating system.
How to lookup a website's IP address on Windows
To check the server IP addresses for a domain name on Windows, follow these steps:
- Open a command prompt by navigating to Start → 'Type here to search' → 'cmd' → Open.
- Type
nslookup -q=A example.com
and hit [enter] to get the IPv4 addresses forexample.com
. - The IP addresses are listed below the Non-authoritative answer heading.
- (Optional) To also see the IPv6 addresses, repeat these steps with
AAAA
instead ofA
.
How to lookup a website's IP address on Mac OS
To check the IP addresses for a domain name on a Mac, follow these steps:
- Open a terminal by entering [command] + [space] → 'terminal.app' → [enter].
- Type
dig example.com A
and hit [enter] to get the IPv4 addresses forexample.com
. - The IP addresses are listed below the ANSWER SECTION heading.
- (Optional) To also see the IPv6 addresses, repeat these steps with
AAAA
instead ofA
.
How to lookup a website's IP address on Linux
To check the IP addresses for a domain name on Linux, follow these steps:
- Open a terminal by entering [Super] → 'terminal' → [enter].
- Type
dig example.com A
and hit [enter] to get the IPv4 addresses forexample.com
. - The IP addresses are listed below the ANSWER SECTION heading.
- (Optional) To also see the IPv6 addresses, repeat these steps with
AAAA
instead ofA
.
How to find a website's IP address
To check the IP addresses of a domain, follow these steps:
- Open the website to IP lookup tool.
- Enter the URL or domain name and hit [enter].
- The tool will query the IPv4 and IPv6 addresses and shown them at the top of the page.