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 owns each address, whether a CDN stands in front of the real server, 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).

Then it goes further than a plain DNS to IP lookup: it follows the CNAME aliases from the name to its addresses, finds the network that announces each address and who the block is registered to, flags addresses that belong to a CDN rather than the website's own server, and shows what five public resolvers answer side by side.

Domain to IP result: a domain's IPv4 and IPv6 addresses with the CNAME chain, network owner and five DNS resolversDomain to IP result: a domain's IPv4 and IPv6 addresses with the CNAME chain, network owner 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.

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 serverHidden behind CloudflareOnly 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.
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. Pick the same resolver above to compare.

  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 on that computer.

  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 endpoint with CORS for browsers: POST a domain or GET it in the query, with an optional resolver. The answer keeps the fields of our older API and adds the CNAME chain, TTLs, networks, the www twin and all five resolvers. 30 lookups a minute per network; repeats come from cache while the TTL lasts.

GET /api/domain-ip
$ curl "https://dnsrobot.net/api/domain-ip?domain=github.com&dnsServer=cloudflare"
{
  "success": true, "domain": "github.com",
  "summary": { "totalIPs": 1, "ipv4Count": 1, "ipv6Count": 0, "hasCDN": false, … },
  "ipAddresses": [ { "ip": "140.82.121.4", "version": "IPv4", "asn": "AS36459", "ttl": 60, … } ],
  "chain": [], "twin": { "name": "www.github.com", … }, "resolvers": [ … ]
}

Domain to IP FAQ

How do I find the IP address of a website?

Type its domain into the Domain to IP tool above, or paste any URL from the site, and press Find IP. You get every IPv4 and IPv6 address, the network that owns each one, and whether a CDN stands in front of the real server. On your own computer, nslookup example.com on Windows, or dig +short example.com A and dig +short example.com AAAA on macOS and Linux, give the addresses your own resolver sees.

How do I convert a domain to an IP address?

DNS does the converting: a domain's A records hold its IPv4 addresses and its AAAA records its IPv6 addresses. A domain to IP converter asks a resolver for both, follows any CNAME alias on the way, and shows the result. This one asks five resolvers at once, so you can see whether they agree and whether any of them blocks the name.

Is DNS to IP, host to IP or URL to IP the same thing?

Yes, all of them resolve a domain or hostname to its IP address through DNS. A hostname such as www.example.com or mail.example.com is looked up the same way as a bare domain, and a URL to IP lookup simply takes the host out of the link first: the scheme, port, path and query play no part. Note that www.example.com and example.com are separate names and can resolve to different addresses.

Why does a domain have several IP addresses?

Usually for one of four reasons: the site supports both IPv4 and IPv6, several servers share the load (round-robin DNS), the site answers with servers near each resolver, or a CDN serves it from its edge servers or anycast addresses. The resolvers view shows when resolvers get different addresses for the same name, which points to rotation or answers by location.

Why does the IP address belong to Cloudflare?

Because the site is behind Cloudflare's proxy: its DNS records point to Cloudflare, which answers visitors and fetches the pages from the site's own server. Those Cloudflare addresses are shared by many sites, so they don't tell you where the website is hosted. The Hosting Checker looks for clues to the host behind the CDN.

How do I find a website's IP address with the command line?

On Windows, run nslookup example.com in Command Prompt, or Resolve-DnsName example.com in PowerShell to see each record with its TTL. On macOS and Linux, dig +short example.com A gives the IPv4 addresses and AAAA the IPv6 ones; getent ahosts example.com on Linux shows what the system itself resolves. ping example.com shows the one address your computer picked.

Why do I get a different IP address than this tool?

Your computer asks a different resolver, which may pick servers near you; the site may rotate its addresses; your computer may still hold an older answer until its TTL runs out; or a hosts file entry overrides DNS. Choose the same resolver above, Google or Cloudflare for example, to compare like with like.

Can I find the real IP address behind Cloudflare?

Not through DNS: a proxied record only ever shows Cloudflare's addresses, and Domain to IP never reveals a server a CDN hides. The origin can leak through records that skip the proxy, such as a mail. name or an SPF record, which is why site owners should check them. To report abuse, use Cloudflare's abuse form; it forwards reports to the host and the site's owner.

Can an IP address identify a website?

Only sometimes. One address on shared hosting or a CDN serves hundreds or thousands of sites, and its reverse DNS name, if it has one, belongs to the host, not to any of them. A dedicated server's reverse name or its registry record can point to its owner. Typing the address in a browser rarely opens the site, because the server picks the site by name.

How can I trace a website's location?

Look up its IP address, then where that address is: DB-IP's city for a server in one data centre, or the country its block is registered in. A CDN address has no single place: it is an edge server near whoever asked, or an anycast address that answers from many places. None of this locates the people behind the site; WHOIS shows the domain's registration.

Is it legal to look up or trace a website's IP address?

Yes. DNS publishes a domain's addresses so every browser can reach the site, and the internet registries publish who holds each address block; a lookup reads that public data. What is illegal is misusing it, such as attacking or breaking into a server. To report abuse from an address, contact the network's abuse desk shown in the result.

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

It's free, with no account; one network can run 30 lookups a minute. Lookups run on our server, so the website never sees your visit. An answer is kept only as long as its DNS records may be cached, five minutes at most, so repeats are fast. We don't log who looked up what.

Missing something?Suggest a feature or a new tool