Public vs. private address space
Public IP
192.0.2.10
globally unique -- routable from anywhere
Private ranges
not routable on the public internet
Public vs. Private IP Addresses: Difference and Examples
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
not routable on the public internet
The two scopes
| Private IP | Public IP | |
|---|---|---|
| Scope | Your local network only | The entire internet |
| Unique? | Only within your network | Globally unique |
| Assigned by | Your router (DHCP) | Your ISP or hosting provider |
| Routable online? | No — routers drop it | Yes |
| Example | 192.168.1.5 | 93.184.216.34 |
| Who sees it | Devices on your network | Every 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.
| Range | Addresses | Typically used by |
|---|---|---|
10.0.0.0/8 | 16.7 million | Large corporate networks, cloud VPCs |
172.16.0.0/12 | 1 million | Medium networks, Docker defaults |
192.168.0.0/16 | 65,536 | Home 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.1is 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.
Your device sends a packet
Source
192.168.1.5, destination the website's public address.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.
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.
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
ipconfigip 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:
curl ifconfig.meWhy 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
Frequently asked questions
Related reading
Two addressing schemes, running side by side
IPv4
192.0.2.10
32 bits -- ~4.3 billion addresses -- exhausted
IPv6
2606:4700::6810:84e5
128 bits -- 340 undecillion addresses
What Is an IP Address? IPv4, IPv6 and Examples
The numeric label behind every website, server, and phone on the internet — what it means, how to read it, and why there are two incompatible versions.
What is actually behind the address you resolved
Shared IP
Many sites on one address -- the Host header picks yours
Dedicated IP
Only you -- you control its reverse DNS
CDN edge
Not the origin -- the edge terminates the connection
Shared vs. Dedicated IP Addresses: Differences and Use Cases
The honest answer: most websites do not need a dedicated IP. Here is when it genuinely matters, and which supposed benefits are myths.
A recursive DNS lookup, one hop at a time
Browser
wants example.com
Resolver
your ISP / 1.1.1.1
Root + TLD
who runs .com?
Authoritative
the real answer
Every hop down this chain is itself a DNS lookup, cached afterward
How to Find the IP Address of a Website or URL (5 Methods)
What is the IP address of a website? Five ways to find the IP address of any website or URL, with exact commands for Windows, macOS, and Linux.