Domain to IP

Convert any domain or URL to its IP addresses, IPv4 and IPv6, and see what a plain lookup hides: the CNAME chain behind the name, the network that announces each address and who it's registered to, whether a CDN stands in front of the site, and what five public DNS resolvers answer.

Sources: five public DNS resolvers · Team Cymru · the regional internet registries (RDAP) · DB-IP

How to find the IP address of a website

Type the website's domain, or paste any URL, and press Find IP. Domain to IP asks DNS for the name's A records (IPv4 addresses) and AAAA records (IPv6 addresses), the same question a browser asks before it connects, and lists every address with how long resolvers may keep it (the TTL).

The TTL matters most when a site moves to a new server: resolvers and computers that already hold the old address keep using it until its TTL runs out, so for that long some visitors still reach the old server. A TTL of 300 means five minutes at most, 86400 a whole day. To make a move reach everyone within minutes, lower the TTL first and wait out the old one.

Domain to IP result: a domain's IPv4 and IPv6 addresses with the CNAME chain, each address's network and five DNS resolversDomain to IP result: a domain's IPv4 and IPv6 addresses with the CNAME chain, each address's network and five DNS resolversThe answerEvery IPv4 and IPv6 address, ready to copy, and what the lookup found in a sentence each.Each addressIts network and AS number, the registry's record with the abuse contact, the reverse name and DB-IP's city.Five resolversGoogle, Cloudflare, Quad9, OpenDNS and AdGuard asked at once: rotating addresses and filtering blocks show here.The pathFrom the resolver to the name, each CNAME alias, the addresses and the network behind them.
A lookup of www.python.org: an alias leads to Fastly's addresses, the same from all five resolvers. Select a number to see what each part shows.

Why does a website have more than one IP address?

A domain can have many A and AAAA records, and the set can change between lookups. Four reasons cover nearly every case:

  • IPv4 and IPv6

    A site that supports both has A records and AAAA records. A device with IPv6 usually tries the IPv6 address first and falls back to IPv4 within a fraction of a second (Happy Eyeballs).

  • Load balancing

    Several servers share the traffic: the DNS answer lists them all, often in a different order each time, and clients usually try them in order. This is round-robin DNS.

  • Answers by location

    Big sites answer each resolver with servers near it, so a lookup from Tokyo and one from Frankfurt get different addresses. Resolvers can pass on part of the visitor's address for this (EDNS Client Subnet).

  • Anycast and CDNs

    A CDN such as Cloudflare announces the same address from hundreds of data centres, and the internet's routing carries each visitor to a nearby one. One address, many places.

Is the IP address the website's real server?

Not when a CDN or a security proxy is in front. Then the domain resolves to the CDN's addresses: visitors connect to the CDN, and the CDN fetches the pages from the website's own server, the origin, out of sight. The address is real, but it belongs to the CDN and serves thousands of other sites too. Some sites have no origin at all: on Cloudflare Pages or Workers, the site runs on Cloudflare's own network.

Domain to IP tells the two apart. It knows the networks of the big CDNs and proxies (Cloudflare, Akamai, Fastly, Imperva, Sucuri and others) by their AS numbers, and the CDNs that run on a cloud's network, like Amazon CloudFront, by the CNAME they give their customers. Their addresses get no city: a CDN address is either an edge server near the resolver that asked or an anycast address that answers from many places at once, and neither says where the website is stored.

Can you find the real IP behind Cloudflare?

Not from DNS: a proxied record answers with Cloudflare's addresses only. The origin can still leak through records that skip the proxy, such as mail. or ftp. names, MX records or an SPF record that lists the server's address.

If the site is yours, proxy every web record that points at the origin, and run mail and anything else that can't be proxied on another server. If it isn't, report abuse to the CDN: Cloudflare forwards reports to the host and the site's owner.

We show the addresses a name resolves to, never a server a CDN hides: that address is what lets attacks get around the CDN's protection.

How www.example-shop.com resolves

  1. AskedGoogle Public DNS8.8.8.8 · 18 ms · TCP
  2. Namewww.example-shop.com
  3. Aliaswww.example-shop.com.cdn.cloudflare.netCloudflare
  4. Addresses203.0.113.10203.0.113.112001:db8::10
  5. NetworkCloudflareAS13335 · registered in United States
  6. Origin serverNot public, if there is oneOnly the site's owner and Cloudflare know it
From the name down: Name · Alias · Addresses · Network · Origin server

Find a website's IP address with nslookup, ping and dig

Every computer can convert a domain to an IP address from the command line. Put the site's name in place of example.com:

SystemCommandWhat it shows
Windowsnslookup example.comThe addresses from your configured resolver; add a server's address to ask that one (nslookup example.com 8.8.8.8).
Windows PowerShellResolve-DnsName example.comEach A, AAAA and CNAME record with its TTL.
macOS, Linuxdig +short example.com AThe IPv4 addresses, after any alias names; AAAA for IPv6, without +short for the TTLs. On Linux, dig comes with the dnsutils or bind-utils package.
Linuxgetent ahosts example.comWhat the system itself resolves, the hosts file included, as most programs see it.
Anyping example.comThe one address the system picked, IPv6 or IPv4 (a Mac's ping uses IPv4 only; ping6 for IPv6).

On an iPhone or Android phone there is no command line: use the lookup above, which works in any browser.

In Chrome or Edge, the developer tools' Network tab shows the address a page actually loaded from: select the first request, then Remote Address under Headers.

Why does my computer or ping show a different IP?

A lookup here and one on your own computer can disagree, and both can be right:

  1. 1

    A different resolver

    Your computer asks your provider's or router's resolver, which may pick other servers near you. Picking the same resolver above brings the answers closer, but we ask from our server's location, so answers by location can still differ.

  2. 2

    Rotation and location

    A load-balanced or location-aware site answers with other addresses each time or in each place.

  3. 3

    A cached answer

    Your computer and browser keep answers until their TTL runs out, so a site that just moved can show its old address for a while.

  4. 4

    The hosts file

    An entry in the hosts file (C:\Windows\System32\drivers\etc\hosts, /etc/hosts) overrides DNS for ping and most programs on that computer. Asked a named server (nslookup example.com 8.8.8.8, dig @8.8.8.8 example.com), nslookup and dig skip it and the cache.

  5. 5

    IPv6 first

    Browsers, and ping on Windows and Linux, prefer IPv6 when your network has it, so they often use the AAAA address, not the A.

Why doesn't the website open when I type its IP address?

Because one server, and one IP address, often carries many websites. The browser names the site it wants in every request (the Host header, and in HTTPS the SNI field of the handshake), and the server picks the site from that name. Typed as a bare address, the request names no site: the server shows a default page, an error, or a certificate warning, since its certificate is for the domain, not the address.

Behind a CDN it fails for the same reason: Cloudflare, for one, refuses a request for its own address with error 1003.

One server, one address192.0.2.10
  • Host: shop.examplethe shop's pages
  • Host: blog.examplethe blog's pages
  • Host: 192.0.2.10a default page or an error

Can an IP address identify a website?

Only sometimes. A dedicated server's address often has a reverse DNS name (a PTR record) that hints at its owner, but on shared hosting and CDNs one address serves hundreds or thousands of domains, and the reverse name, if there is one, is the host's (an Amazon or Akamai name), not the site's. Reverse DNS shows an address's own name, and IP Lookup shows the network and organisation it is registered to.

How to trace a website's location

Three different answers hide behind "where is this website?", and lookups often mix them up:

Where the server standsA geolocation database such as DB-IP places the address in a city. Good for a server in one data centre; meaningless for a CDN address, an edge server near whoever asked or an anycast address that is everywhere.
Where the address block is registeredThe country of the organisation the regional registry gave the block to. Most of Cloudflare's blocks are registered in the US, wherever the servers stand.
Who runs the websiteNot in the address at all: WHOIS names the registrar and often hides the owner; the site's own pages (contact, imprint) usually say who is behind it.

None of these locate a person: a website's address leads to a data centre and the company that runs it.

Domain to IP API

A free JSON API with open CORS: GET /api/v2/domain-ip?domain=example.com returns every address with its network and CDN, the CNAME chain, the www twin and all five resolvers' answers. Our older endpoint, /api/domain-ip, still answers: its GET keeps www., its POST drops a leading www. as our first API did. Each visitor (an IPv4 address or an IPv6 /64) can run 30 lookups a minute; on /api/domain-ip, repeats served from the cache don't count.

Every field and error in the API docs

GET /api/v2/domain-ip
# The shape of an answer (example.com, abbreviated)
$ curl "https://dnsrobot.net/api/v2/domain-ip?domain=example.com"
{
  "query": { "domain": "example.com", "resolver": "google" }, "status": "ok",
  "addresses": [ { "ip": "104.20.23.154", "version": 4, "ttl": 300,
    "network": { "asn": 13335, "name": "Cloudflare", … }, "cdn": { "id": "cloudflare", … }, … }, … ],
  "cdn": { "id": "cloudflare", "name": "Cloudflare", "detectedBy": "network" },
  "twin": { "name": "www.example.com", "sameAddresses": true, … }, "resolvers": [ … ]
}
# The older endpoint: POST /api/domain-ip {"domain": "example.com"}

Domain to IP FAQ

How do I find the IP address of a website?

Type its domain, or paste any URL from the site, into the domain to IP converter above and press Find IP. You get every IPv4 and IPv6 address, the network that announces each one and whether a CDN stands in front of the site. To see what your own computer gets, run one of the commands in the table above: nslookup on Windows, dig on macOS and Linux.

Why do www.example.com and example.com give different addresses?

Because they are two separate names in DNS, each with its own records. The www name is often an alias (CNAME) of a CDN or hosting platform, while the bare domain can't be an alias: it must hold the zone's SOA and NS records, and a CNAME allows no other records beside it. Domain to IP looks up both and says whether they match.

Why does the IP address belong to Cloudflare?

Because the site uses Cloudflare: its DNS records point to Cloudflare, which answers visitors and either fetches the pages from the site's own server or, for a site on Cloudflare Pages or Workers, runs the site itself. Those addresses are shared by many sites, so they don't show where the website is hosted. The Hosting Checker looks for clues to the host behind them.

Why does the result hide some addresses?

Because they may belong to the server a CDN protects. When a name is behind a CDN, an address of its www twin, or one that another resolver gets, can skip the CDN and lead to the origin, which lets attacks get around the CDN's protection. Domain to IP counts such addresses and names their network, but never shows them. Addresses in the chosen resolver's own answer are never hidden this way.

What does it mean when a resolver blocks the name?

It means the name is on that resolver's filter list, not that the site is down. Quad9, OpenDNS and AdGuard DNS refuse names on their threat lists, and AdGuard blocks ads and trackers too: Quad9 answers that the name doesn't exist, OpenDNS gives a block-page address and AdGuard 0.0.0.0. Google and Cloudflare 1.1.1.1 don't filter, so they still return the real addresses.

Which resolver should I choose?

The one you want to compare with: the other four are asked at the same time anyway, and the Resolvers view shows all five answers. Google Public DNS, the default, and Cloudflare 1.1.1.1 don't filter. Quad9, OpenDNS and AdGuard DNS block names on their lists, so choose one of them to see what its users get, for example whether a name is blocked.

What if a site has only IPv4 or only IPv6 addresses?

Then it can be reached over that protocol only. With A records alone, visitors connect over IPv4, even from a network that also has IPv6. With AAAA records alone, visitors on networks without IPv6 can't reach the site at all. Domain to IP flags either case with a note, and the IPv6 Test shows whether your own connection has IPv6.

Why does an address have no reverse name?

Because the reverse name is published by whoever holds the address block, not by the website's owner, and not every holder publishes one. A reverse name (PTR record) lives in a reverse zone run by the block's holder, such as the host or the CDN. A missing name says nothing about the site; on a shared address, a name would belong to the host anyway. Reverse DNS shows who runs an address's reverse zone.

What does “Not in DNS” mean for a domain?

It means the resolvers found no such name: DNS has no records for it at all (NXDOMAIN). The domain may still be registered: a domain without nameservers, or one its registrar or registry put on hold, drops out of DNS. WHOIS Lookup shows whether someone holds it. A name that exists but has no A or AAAA record shows “No address” instead.

Is this domain to IP lookup free, and do you keep what I look up?

It's free, with no account: each visitor (an IPv4 address or an IPv6 /64) can run 30 new lookups a minute, and repeats served from the cache don't count. The DNS lookups run on our server, so the website never sees your visit, but your browser reads each network's record from its regional registry, which sees your IP address. An answer is kept for its records' TTL, 30 seconds to 5 minutes. We don't log who looked up what.

Missing something?Suggest a feature or a new tool