Search results for:


How to Find Your Server's IP Address: Public and Private Options Featured Image

How to Find Your Server's IP Address: Public and Private Options

by: Hostwinds Team  /  April 14, 2025


Your server's IP address is needed for managing your website, setting up remote access, troubleshooting connectivity, and more.

Whether you're using a Windows, Linux, or macOS system, there are a number of simple ways to quickly locate your server's IP address.

This guide will go over the different methods you can use.

What Is a Server IP Address?

A server's IP address is a unique identifier that allows devices to connect over a network. It can be either public (used to communicate over the internet) or private (used within a local network).

Knowing your server's IP address helps with configuring DNS settings, managing security rules, and accessing the server remotely.

Learn More: What is an IP Address

Finding Your Server's Public IP Address

Your public IP address is what the rest of the internet sees when your server communicates externally.

It's the address you'll use for things like pointing a domain name to your server, setting up firewall rules, or remote connections like SSH or RDP.

Here are a few ways to find your server's public IP address:

Using a Search Engine

This is one of the fastest and most user-friendly ways to discover your public IP address:

  1. Open any web browser on the server or a device connected to the same internet connection.
  2. Go to a search engine like Google or Bing.
  3. Type in: What is my IP address
  4. The public IP will appear at the top of the results page.

This method is especially useful for quickly checking your IP without needing technical commands or tools.

Checking Your Hosting Dashboard

If your server is hosted with a web hosting company, they should display the server's public IP address in their management interface:

  1. Log in to your hosting account.
  2. Navigate to the control panel or server/instance section.
  3. Look under network settings or instance details.
  4. The public IP is usually listed clearly next to the server name or configuration settings.

This is a reliable method since it displays the correct address even if your server setup has multiple interfaces or IPs.

3. Using the Command Line

If you prefer to use the command line interface (CLI), there are several simple commands for getting your public IP address.

On Linux or macOS:

Option 1:

curl ifconfig.me

This command sends a request to a service that returns your public IP.

Option 2:

curl -s checkip.dyndns.org | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+'

This grabs the IP from the HTML response provided by checkip.dyndns.org.

On Windows (PowerShell):

(Invoke-WebRequest ifconfig.me/ip).Content.Trim()

This pulls the IP address using PowerShell. It works similarly to the Linux command above but tailored for Windows users.

Finding Your Server's Private IP Address

A private IP address is used within a private network (for example, between your server and a local router or other internal machines).

It's good to know your private IP address when working within a virtual private cloud (VPC), configuring internal firewalls, or for troubleshooting local connections.

On Windows:

  1. Press Win + R, type cmd, and hit Enter to open Command Prompt.
  2. In the Command Prompt, type:
ipconfig

Look for the line labeled IPv4 Address under the appropriate network adapter. This is your server's private IP.

On Linux:

Option 1:

  1. Open a terminal session.
  2. Run the following command:
ip a

Locate your active network interface (commonly named eth0, ens33, or wlan0). The private IP address is typically listed after inet and looks something like 192.168.x.x or 10.x.x.x.

Option 2:

hostname -I

This will return the internal IP addresses assigned to your server.

On macOS:

  1. Open Terminal.
  2. Type the following command and press Enter:
ipconfig getifaddr en0

Tip: If you're on a wired connection and it doesn't return anything, try replacing en0 with en1 or another interface name depending on your setup.

Other Ways to Find Your Server's IP Address

  • cPanel: If your hosting provider uses cPanel, you can find your server's IP under the "Server Information" section.
  • Network Settings: On cloud platforms like AWS, Google Cloud, or Azure, you can find the server's IP in the network settings within the management console.
  • Remote Desktop or SSH: If you have remote access, logging into the server and running network commands will display the IP configuration.

Written by Hostwinds Team  /  April 14, 2025