Domain IP Lookup

Public vs. private address space

Public IP

192.0.2.10

globally unique -- routable from anywhere

Private ranges

10.0.0.0/8172.16.0.0/12192.168.0.0/16

not routable on the public internet

DNS Fundamentals

Public vs. Private IP Addresses: Difference and Examples

3 min read

Check your network settings and you might see 192.168.1.5. Visit a site that reports your IP address and it shows something completely different. Neither is wrong — you genuinely have two addresses, operating at different scopes. That is the difference between a public IP address and a private IP address: a public address is reachable across the internet, while a private address only works inside your own network.

Public vs. private address space

Public IP

192.0.2.10

globally unique -- routable from anywhere

Private ranges

10.0.0.0/8172.16.0.0/12192.168.0.0/16

not routable on the public internet

Private ranges are reused in every network on earth. Public addresses are globally unique.

The two scopes

Private IPPublic IP
ScopeYour local network onlyThe entire internet
Unique?Only within your networkGlobally unique
Assigned byYour router (DHCP)Your ISP or hosting provider
Routable online?No — routers drop itYes
Example192.168.1.593.184.216.34
Who sees itDevices on your networkEvery site you visit

Key takeaway

Private addresses are reused in millions of separate networks simultaneously and are never routed across the internet. Public addresses are globally unique and are what the internet actually uses to reach you.

The reserved private ranges

RFC 1918 sets aside three IPv4 blocks for private use. Anyone may use them internally, and no router on the public internet will forward them.

RangeAddressesTypically used by
10.0.0.0/816.7 millionLarge corporate networks, cloud VPCs
172.16.0.0/121 millionMedium networks, Docker defaults
192.168.0.0/1665,536Home and small-office routers

A few other ranges are reserved for related purposes and also never appear as a legitimate public answer:

  • 127.0.0.0/8 — loopback. 127.0.0.1 is always your own machine.
  • 169.254.0.0/16 — link-local, self-assigned when DHCP fails. Seeing one usually means your device could not reach the router.
  • 100.64.0.0/10 — carrier-grade NAT, used by ISPs that cannot give every customer a public address.

NAT: how private addresses reach the internet anyway

If private addresses cannot be routed, how does a laptop on 192.168.1.5 load a website? Network Address Translation, performed by your router.

  1. Your device sends a packet

    Source 192.168.1.5, destination the website's public address.

  2. The router rewrites the source

    It replaces the private source with its own public address and records the swap in a translation table, tagged with a port number.

  3. The website replies to the router

    As far as the server is concerned, it is talking to your router's public address. It has no knowledge of your laptop.

  4. The router translates back

    It consults the table, sees which internal device that port belongs to, rewrites the destination, and forwards it to 192.168.1.5.

This is why every device in your home appears to websites as the same address, and why an IP address identifies a connection, not a person.

Finding both of your addresses

Your private address

Windows
ipconfig
macOS / Linux
ip addr show
# or, on macOS:
ifconfig | grep "inet "

Your public address

You cannot discover this from inside your own network — you have to ask something outside it, which is what "what is my IP" services do. From a terminal:

Ask an external service
curl ifconfig.me

Why a domain should never resolve to a private address

A public domain resolving to 10.0.0.5 or 127.0.0.1 is either a misconfiguration or deliberate — and either way it is a problem for any service that resolves user-supplied domains.

The attack is simple: point a domain you control at 169.254.169.254, submit it to a service that fetches URLs server-side, and the service reads its own cloud metadata on your behalf. A DNS rebinding variant makes the record change between the validation check and the actual fetch.

The defence is to validate the resolved address, not the submitted hostname — which is exactly what happens here, and why a domain resolving internally simply reports as unresolvable rather than leaking that detail. The how it works page covers the full validation chain.

Need to check a domain's public DNS addresses? Use the Domain IP Lookup tool.

Free tools for this topic

public vs private ipprivate ip address192.168 ip addresswhat is nat

Frequently asked questions