Can I Look Up a Domain Name Instead of an IP Address?

Abdul Mateen
By Abdul Mateen Integration Engineer
Posted on November 26, 2026 | 6 min read
Can I Look Up a Domain Name Instead of an IP Address?
Back to Help Center

Yes. IPGeolocation.io lets you look up a domain name instead of an IP address on paid plans: send the domain in the same ip parameter you'd use for an address. The API resolves the domain through DNS, looks up the IP address it points to, and returns that address's geolocation, network, ASN, and company data, plus a domain field holding the name you sent, without any leading https://. A free Developer plan key gets 401 Unauthorized for a domain and uses no credits.

The result describes the server the domain points to, not the organization that owns it: a hosting provider's server, or a CDN's address, which the response flags.


What the API returns for a domain

The IPGeolocation.io response has the same structure as an IP lookup, with two differences: ip holds the address the domain resolved to, and a top-level domain field holds the name you sent. This request looks up ipgeolocation.io with a few fields:

curl -sS --fail-with-body \
  "https://api.ipgeolocation.io/v3/ipgeo?apiKey=${IPGEO_API_KEY}&ip=ipgeolocation.io&fields=location.country_name,location.state_prov,location.city,network.is_cdn,network.cdn_provider_name,asn.as_number,asn.organization,company.name"

The response, trimmed by fields (looked up November 10, 2026):

{
  "domain": "ipgeolocation.io",
  "ip": "116.202.113.61",
  "location": {
    "country_name": "Germany",
    "state_prov": "Bavaria",
    "city": "Falkenstein"
  },
  "network": {
    "is_cdn": false,
    "cdn_provider_name": ""
  },
  "asn": {
    "as_number": "AS24940",
    "organization": "Hetzner Online GmbH"
  },
  "company": {
    "name": "Hetzner Online GmbH"
  }
}

The domain resolves to an address on Hetzner's network, which our data places in Falkenstein, Bavaria. fields and excludes can't remove domain or ip, so every result keeps both. A domain can resolve to several addresses that vary by resolver, location, and time; each lookup describes the one address resolved for that request. The include parameter works as it does for an IP lookup: include=security, for example, adds security data on the server's address, meaning VPN, proxy, and Tor detection with a threat score. The IP Geolocation API documentation lists every field.


Why you get the server's location, not the company's

DNS maps a domain to the address of whatever answers its traffic, and that address is all a domain lookup can describe. Two lookups from November 10, 2026:

Domain Resolved IP Location is_cdn Company
ipgeolocation.io 116.202.113.61 Falkenstein, Bavaria, Germany false Hetzner Online GmbH
example.com 104.20.23.154 San Francisco, California, United States true (cdn_provider_name: Cloudflare) Cloudflare, Inc.

The first row is a site on a hosted server. The location is the server's, and the company is the hosting provider rather than the business behind the site. In the second, example.com resolves to a Cloudflare CDN address. The city is where our data places that address. A CDN answers visitors from servers in many places, so the server that handles a given visitor can be elsewhere; our guide on how anycast routing affects IP geolocation explains why. The servers that hold the site, its origin, can be anywhere, and a domain lookup doesn't find them: it describes the address DNS returned, nothing behind it.

Check is_cdn and cdn_provider_name in the IPGeolocation.io response before treating a domain's city as the site's location. is_cdn is true when the address belongs to a CDN or a cloud provider's network, and cdn_provider_name names the CDN provider when it's known.

Flow: a domain resolves to one IP; ipgeolocation.io shows Hetzner in Falkenstein, example.com a Cloudflare CDN address
A domain lookup returns the location of the address the domain points to. For a site behind a CDN, is_cdn and cdn_provider_name say so.

Looking up many domains at once

On paid plans, the IPGeolocation.io bulk endpoint, /v3/ipgeo-bulk, takes domains and IP addresses in the same list, up to 50,000 entries per request. Send them as a JSON ips array:

curl -sS --fail-with-body -X POST \
  "https://api.ipgeolocation.io/v3/ipgeo-bulk?apiKey=${IPGEO_API_KEY}&fields=location.city,network.is_cdn,company.name" \
  -H "Content-Type: application/json" \
  -d '{"ips": ["ipgeolocation.io", "www.cloudflare.com", "https://example.com/page", "91.128.103.196"]}'

Results come back in the order you sent them, each domain with its own domain and resolved ip. A failed entry becomes an object holding only a message, and the rest of the request still succeeds (trimmed; looked up November 10, 2026):

[
  {"domain": "ipgeolocation.io", "ip": "116.202.113.61", "location": {"city": "Falkenstein"}, "network": {"is_cdn": false}, "company": {"name": "Hetzner Online GmbH"}},
  {"domain": "www.cloudflare.com", "ip": "104.16.124.96", "location": {"city": "San Francisco"}, "network": {"is_cdn": true}, "company": {"name": "Cloudflare, Inc."}},
  {"message": "Provided name, service or IP address 'https://example.com/page' is not valid."},
  {"ip": "91.128.103.196", "location": {"city": "Stockholm"}, "network": {"is_cdn": false}, "company": {"name": "Tele2 Sverige AB"}}
]

The third entry failed because it's a full URL with a path, and it isn't charged; the X-Credits-Charged response header reports the whole request's total, not each entry's. An HTTP 200 doesn't mean every entry succeeded, so check each one for message before reading its fields. The Python SDK types each item as a success or an error.


Input rules and errors

  • What to send: a domain or subdomain, such as ipgeolocation.io or www.cloudflare.com. A leading https:// is removed.
  • Paths and query strings: a full URL such as https://example.com/page returns 400 Bad Request. Send the hostname only.
  • Domains that don't resolve: a name with no DNS answer also returns 400, with the message "Provided name, service or IP address ... is not valid."
  • Address not in the database: if the address the domain resolves to isn't in the IPGeolocation.io database, the API returns 404 Not Found.
  • IP Security API: the standalone IP Security API (/v3/security) accepts IP addresses only. For security data on a domain, add include=security to a /v3/ipgeo request.

On the free plan

A free IPGeolocation.io Developer key can't look up domains, so split the job in two. Resolve the domain to its IP first, with our Hostname to IP tool or a command such as dig +short example.com on macOS and Linux or nslookup example.com on Windows. Then look up that address. For a domain behind a CDN or on location-based DNS, your resolver and ours can get different addresses, so the two results may not match.

You'll get location and basic ASN data, and the ASN organization usually names the CDN for a CDN address (Cloudflare, Inc., for example.com). The network and company objects are paid, so a free lookup won't return is_cdn or cdn_provider_name. What the free plan includes lists the rest, and the pricing page compares plans.

FAQ

It can. IPGeolocation.io returns the company and ASN of the address a domain resolves to, which for a directly hosted site usually identifies the hosting provider: Hetzner Online GmbH for ipgeolocation.io. When the domain resolves to a CDN address, is_cdn is true and cdn_provider_name names the CDN when it's known, and the host behind it doesn't show.

Only the hostname part. A leading https:// is removed for you, but IPGeolocation.io returns 400 Bad Request for a URL with a path, such as https://example.com/page. Send the hostname, example.com, instead.

The address DNS returned when the API resolved the domain, an IPv4 (A record) or IPv6 (AAAA record) address, shown in the ip field of the IPGeolocation.io response. The answer can change: example.com resolved to 172.66.147.243 on November 5, 2026, and to 104.20.23.154 on November 10. To check every address, resolve the domain with the Hostname to IP tool and look each one up.

No. A domain lookup is charged like an IP lookup on IPGeolocation.io: 1 credit for the base data, plus 2 for security data (include=security) and 1 for abuse contact data (include=abuse). Only successful (HTTP 200) responses are charged; how credits are charged has the full rules.

Not a full list. The closest answer is the address's reverse DNS name, the PTR hostname its operator set. Our IP to Hostname tool shows it for free, and paid API lookups can add it with include=hostname. One server can host many sites, and the PTR name won't list them.


Start looking up domains

One IPGeolocation.io /v3/ipgeo call can return geolocation, security, ASN, company, abuse contact, time zone, and user agent data, whether you send it a domain or your visitors' IP addresses. Domain lookups and bulk requests come with paid plans; compare them on the pricing page or start with the API documentation.

Related Help Articles

How Do I Contact IPGeolocation.io?
How Do I Contact IPGeolocation.io?

Reach IPGeolocation.io by live chat, answered by people 24/7, by email at support@ipgeolocation.io, or by phone. Here is where each question goes and what to include.

Posted on November 24, 2026
By Abdul Mateen
Read More: How Do I Contact IPGeolocation.io?
Does IPGeolocation.io Have Rate Limits?
Does IPGeolocation.io Have Rate Limits?

IPGeolocation.io doesn't throttle requests per second or per minute; it limits usage by credits. See the common causes of HTTP 429, what overage costs, and how to get lookups running again.

Posted on November 22, 2026
By Abdul Mateen
Read More: Does IPGeolocation.io Have Rate Limits?
Why Are My API Credits Rising Faster Than My Website Visitors?
Why Are My API Credits Rising Faster Than My Website Visitors?

When your IPGeolocation.io credits climb faster than your visitors, check both how many lookups your site makes and what each one costs. Here is how to find the cause and what to fix first.

Posted on November 20, 2026
Read More: Why Are My API Credits Rising Faster Than My Website Visitors?
Does IPGeolocation.io Cover Every IPv4 and IPv6 Address?
Does IPGeolocation.io Cover Every IPv4 and IPv6 Address?

IPGeolocation.io covers every IPv4 address, with the special-purpose ranges marked as bogons, and every IPv6 block IANA has allocated to the registries, announced or not. Here is what that means in numbers, how coverage differs by data type, and what the API returns for bogons.

Posted on November 18, 2026
Read More: Does IPGeolocation.io Cover Every IPv4 and IPv6 Address?
What Uptime SLA Does IPGeolocation.io Offer?
What Uptime SLA Does IPGeolocation.io Offer?

See what 99.99% allows in minutes, how we measure it, how to tell an outage from a key or quota error, and how to keep the remaining downtime away from your users.

Posted on November 17, 2026
Read More: What Uptime SLA Does IPGeolocation.io Offer?
Why Is My IP Location Wrong, and How Do I Report It?
Why Is My IP Location Wrong, and How Do I Report It?

A VPN, iCloud Private Relay, a mobile carrier gateway, or an IP block your ISP moved can all put you in the wrong place. Find which one it is, then fix the setting or report the location to IPGeolocation.io.

Posted on November 15, 2026
By Abdul Mateen
Read More: Why Is My IP Location Wrong, and How Do I Report It?

Subscribe to Our Newsletter

Get the latest in geolocation tech, straight to your inbox.