Send, receive, and shield emails with PostScale. One API, EU-hosted. PostScale

    TroubleshootingBeginner

    What Is My IP Address (Windows and Mac)

    Learn what an IP address is, why it matters, and how to find it on Windows and Mac. DNScale explains how your IP connects your device to the internet.

    Answer snapshot

    An IP address identifies a device on a network. Your public IP (assigned by your ISP, visible to the internet) is usually different from your private IP (assigned inside your home/office network by NAT). To find your public IP: visit any 'what is my IP' site or run curl ifconfig.me. To find your private IP: ipconfig on Windows, ifconfig or ip a on Mac/Linux. DNS resolves domain names to IPs — that's the link between human-friendly names and addresses.

    What you'll learn

    • Understand the difference between public and private IP addresses
    • Find your IP address on Windows, Mac, and Linux using multiple methods
    • Understand how DNS uses IP addresses to connect domain names to servers
    • Learn how NAT works and why your public IP differs from your local IP

    Every device connected to the internet has a unique identifier called an IP address. It's like your digital home address, allowing data to find its way to and from your device. Whether you're troubleshooting a connection issue, configuring a DNS record, or debugging network connectivity, understanding your IP address is essential.

    What Is an IP Address?

    An IP address (Internet Protocol address) is a series of numbers separated by dots (for IPv4) or colons (for IPv6) that identifies a device on a network. For example, an IPv4 address might look like 192.168.1.1, while an IPv6 address could look like 2001:0db8:85a3:0000:0000:8a2e:0370:7334.

    These addresses allow devices to send and receive information across the internet or local networks. Without IP addresses, data wouldn't know where to go. Every DNS query ultimately resolves a domain name to an IP address — that is the fundamental purpose of the Domain Name System.

    Public vs. Private IP Addresses

    This is one of the most important distinctions in networking. Your device likely has two different IP addresses:

    Public IP Address

    Your public IP address is assigned by your Internet Service Provider (ISP) and is visible to the rest of the internet. This is the address that websites, DNS servers, and other internet services see when you connect to them. All devices on your home or office network typically share a single public IP address.

    # Find your public IPv4 address from the command line
    curl -4 ifconfig.me
     
    # Find your public IPv6 address
    curl -6 ifconfig.me
     
    # Alternative services
    curl icanhazip.com
    curl ipinfo.io/ip
    dig +short myip.opendns.com @resolver1.opendns.com

    Private IP Address

    Your private IP address is assigned by your local router and is only meaningful within your local network. Common private IP ranges are:

    RangeCIDRTypical Use
    10.0.0.0 - 10.255.255.25510.0.0.0/8Large enterprise networks
    172.16.0.0 - 172.31.255.255172.16.0.0/12Medium networks
    192.168.0.0 - 192.168.255.255192.168.0.0/16Home and small office networks

    Private addresses are not routable on the internet. Your router uses NAT (Network Address Translation) to map private addresses to your single public address.

    Tip: When configuring A records in DNS, always use your public IP address, not your private address. Private addresses are not reachable from the internet.

    How NAT Works

    Network Address Translation (NAT) is the technology that allows multiple devices on a local network to share a single public IP address. Here is a simplified view:

    1. Your laptop (private IP 192.168.1.50) sends a request to a web server
    2. Your router replaces the source address with its public IP (e.g., 203.0.113.10) and tracks the connection in a NAT table
    3. The web server responds to 203.0.113.10
    4. Your router checks its NAT table, translates the destination back to 192.168.1.50, and forwards the response to your laptop

    NAT is necessary because IPv4 address space is limited to approximately 4.3 billion addresses — far fewer than the number of connected devices worldwide. IPv6 eliminates the need for NAT by providing enough addresses for every device to have a globally unique address.

    IPv4 vs. IPv6

    The two main types of IP addresses are IPv4 and IPv6.

    • IPv4 is the older format, using 32 bits, which allows for roughly 4.3 billion unique addresses. Example: 192.0.2.1
    • IPv6 uses 128 bits, offering an almost unlimited number of unique addresses. Example: 2001:db8::1

    Most internet users still use IPv4, but IPv6 adoption is increasing as the world moves toward larger, faster, and more efficient networking. In DNS:

    Your device may have both an IPv4 and an IPv6 address simultaneously (this is called dual-stack). When browsing the web, your browser typically prefers IPv6 when available.

    How DNS Uses IP Addresses

    The entire purpose of DNS is to translate human-readable domain names into IP addresses. Here is how IP addresses fit into the DNS ecosystem:

    A Records (IPv4)

    An A record maps a domain name to an IPv4 address:

    example.com.    3600    IN    A    192.0.2.1

    When someone types example.com in their browser, the DNS resolution process returns this IP address, and the browser connects to it.

    AAAA Records (IPv6)

    An AAAA record maps a domain name to an IPv6 address:

    example.com.    3600    IN    AAAA    2001:db8::1

    PTR Records (Reverse DNS)

    PTR records do the reverse — they map an IP address back to a domain name. This is used for verification purposes, particularly in email delivery where mail servers check that the sending IP's reverse DNS matches the domain in the email headers.

    MX Records and IP Addresses

    MX records point to mail server hostnames, which in turn resolve to IP addresses via A or AAAA records. The complete chain looks like:

    example.com.          MX    10 mail.example.com.
    mail.example.com.     A     192.0.2.10
    mail.example.com.     AAAA  2001:db8::10

    How to Find Your IP Address

    On Windows

    Public IP

    Open Command Prompt or PowerShell and run:

    curl ifconfig.me

    Or use nslookup:

    nslookup myip.opendns.com resolver1.opendns.com

    Private IP

    1. Open the Start menu and type Command Prompt
    2. In the Command Prompt window, type ipconfig and press Enter
    3. Look for IPv4 Address under your active network adapter — that's your local IP address
    4. Look for IPv6 Address for your local IPv6 address
    Windows IP Configuration
     
    Ethernet adapter Ethernet:
       IPv4 Address. . . . . . . . . . . : 192.168.1.50
       Subnet Mask . . . . . . . . . . . : 255.255.255.0
       Default Gateway . . . . . . . . . : 192.168.1.1

    On Mac

    Public IP

    Open Terminal and run:

    curl ifconfig.me

    Private IP

    1. Click the Apple menu and select System Settings
    2. Go to Network, then choose your active network connection
    3. Your IP address will appear under the Status or Details section

    Or use Terminal:

    # IPv4 address
    ipconfig getifaddr en0
     
    # All network interface details
    ifconfig en0

    On Linux

    Public IP

    curl ifconfig.me
    # or
    dig +short myip.opendns.com @resolver1.opendns.com

    Private IP

    # Modern Linux (using ip command)
    ip addr show
     
    # Show just the IPv4 address for the main interface
    ip -4 addr show dev eth0 | grep inet
     
    # Legacy method
    ifconfig eth0

    The dig command is invaluable for understanding how DNS maps domains to IP addresses:

    # Find the IPv4 address for a domain
    dig A example.com +short
    192.0.2.1
     
    # Find the IPv6 address
    dig AAAA example.com +short
    2001:db8::1
     
    # Reverse DNS lookup — find the domain for an IP
    dig -x 192.0.2.1 +short
    example.com.
     
    # Check which nameservers are authoritative
    dig NS example.com +short
    ns1.dnscale.eu.
    ns2.dnscale.eu.
     
    # Trace the full resolution path
    dig +trace example.com

    Static vs. Dynamic IP Addresses

    Static IP

    A static IP address does not change. It is manually configured or permanently assigned by your ISP. Static IPs are used for:

    • Web servers, mail servers, and other services that need a consistent address
    • DNS A records that point to your infrastructure
    • VPN endpoints and remote access
    • SPF records that authorize specific IPs to send email

    Dynamic IP

    A dynamic IP address is assigned automatically by DHCP and may change periodically. Most home internet connections use dynamic IPs. If your public IP changes, any A records pointing to it will become stale until updated.

    Tip: If you are hosting services on a dynamic IP, use a short TTL (e.g., 300 seconds) on your A records so that when your IP changes, DNS resolvers pick up the new address quickly. For a more robust solution, consider a CNAME record pointing to a dynamic DNS hostname.

    IP Addresses and DNS Security

    Your IP address is relevant to several DNS security considerations:

    • SPF records list the IP addresses authorized to send email on behalf of your domain. If you add a new mail server, its IP must be included in your SPF TXT record
    • CAA records control which certificate authorities can issue TLS certificates for your domain — the certificate is bound to the domain, not the IP
    • DNSSEC protects the integrity of DNS responses, ensuring that the IP address returned in an A record has not been tampered with
    • Rate limiting on DNS servers often operates per source IP, which is why NAT can complicate DNS resolution for large networks behind a single public IP

    Why Your IP Address Matters

    Your IP address is more than just a number; it's a key part of how your device communicates with the internet. It helps websites identify your general location, allows servers to send information to you, and ensures your online traffic is correctly routed.

    For network administrators and domain owners, IP addresses are essential for:

    Conclusion

    Understanding your IP address helps you manage your online connections more effectively. Whether you're checking network settings, setting up DNS records, configuring email security, or troubleshooting connectivity issues, knowing the difference between public and private IPs, understanding NAT, and being able to find your IP on any platform are essential skills. DNScale provides tools and a globally distributed DNS network to help you stay connected and confident in your network setup.

    Frequently asked questions

    Why is my private IP different from my public IP?
    Your home or office router sits between your devices and the public internet. Inside the network, devices get private IPs (10.x, 172.16-31.x, 192.168.x — RFC 1918). The router translates these to its single public IP via NAT (Network Address Translation) when traffic leaves the network. Most home networks share one public IP across every device.
    How do I find my public IP address?
    Easiest: visit a site like ipinfo.io or run curl ifconfig.me / curl https://ifconfig.co in a terminal. For IPv6: curl -6 ifconfig.me. The address you see is what the rest of the internet sees when you connect out.
    How do I find my private IP on Windows / Mac / Linux?
    Windows: ipconfig in PowerShell or Command Prompt — look for IPv4 Address under your network adapter. Mac: ifconfig en0 (Wi-Fi) or System Settings → Network → Details. Linux: ip addr or ip a, look for inet under your interface.
    Can my public IP change?
    Yes — most ISPs assign dynamic IPs that may rotate when your modem reboots, on a schedule, or after a connection lapse. Static IPs are typically a paid extra. If you're hosting services from home, use a Dynamic DNS (DDNS) service to map a domain name to whichever IP you currently have.
    How does DNS use IP addresses?
    DNS exists to translate human-readable domain names (example.com) into the IP addresses computers route packets to. An A record holds the IPv4 address; an AAAA record holds the IPv6 address. Every web request, email send, or API call begins with a DNS lookup that returns one of these — that's the connection point between names and addresses.

    Related guides

    Ready to manage your DNS with confidence?

    DNScale provides anycast DNS hosting with a global network, real-time analytics, and an easy-to-use API.

    Start free