Domain to IP

Domain to IP Lookup

Find the IP addresses behind any website or hostname.

Website or hostname to IP

Website to IP in one step: type a domain, a hostname or a full URL and get every A (IPv4) and AAAA (IPv6) record its DNS publishes, with the time-to-live, instantly. Each address links to its reverse DNS check and its geolocation. The other direction, IP to hostname, is one tab away or on the reverse DNS lookup page.

Addresses
● Ready
IPv4 (A)
● Ready
IPv6 (AAAA)
● Ready
API Response
{
"hostname": "—",
"addresses": [— records]
}
Trusted by thousands of businesses
Fast JSON API responses
Real-time validation
Simple integration, SDKs & examples
About Domain to IP

What a Domain to IP Lookup Tells You

Every website lives on one or more IP addresses. A domain to IP lookup asks the domain's DNS for them: the A records hold the IPv4 addresses, the AAAA records the IPv6 ones. The answer is what a browser gets a moment before it connects.

Website, domain, URL — one hostname

A full URL is resolved on its hostname; the scheme and the path play no role. Mind that www.example.com and example.com are different names and can point to different addresses, as can mail., api. or cdn. subdomains.

Several addresses are normal

Sites behind a CDN or a load balancer publish several A and AAAA records, and the set can change by region and by minute. The lookup shows all of them, grouped by type, with the TTL that says how long resolvers may cache each one.

Then look at the addresses

Each result links to the reverse DNS check (does the address point back to a hostname?) and to the IP lookup (country, city, ISP, ASN and the proxy, VPN, Tor and datacenter flags), so a hostname turns into a full picture in two clicks.

Forward Lookup

Forward DNS API

Resolves a hostname to all its A and AAAA records. Useful for confirming FCrDNS checks and verifying email sender configuration.

GET https://ip-api.io/api/v1/dns/forward/{hostname}
Returns all A (IPv4) and AAAA (IPv6) records
Useful for verifying FCrDNS (Forward-Confirmed Reverse DNS)
View Full Docs
Endpoint
GET /api/v1/dns/forward/{hostname}
Example Request
curl "https://ip-api.io/api/v1/dns/forward/dns.google" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example Response
200
{
  "hostname": "dns.google",
  "addresses": [
    {
      "type": "A",
      "address": "8.8.8.8",
      "ttl": 300
    },
    {
      "type": "A",
      "address": "8.8.4.4",
      "ttl": 300
    }
  ]
}
Endpoint
GET /api/v1/dns/forward/{hostname}
Example Request
const response = await fetch(
  "https://ip-api.io/api/v1/dns/forward/dns.google",
  { headers: { Authorization: "Bearer YOUR_API_KEY" } }
);
const data = await response.json();

data.addresses.forEach(a =>
  console.log(a.type, a.address)
);
Example Response
200
{
  "hostname": "dns.google",
  "addresses": [
    {
      "type": "A",
      "address": "8.8.8.8",
      "ttl": 300
    },
    {
      "type": "A",
      "address": "8.8.4.4",
      "ttl": 300
    }
  ]
}
Endpoint
GET /api/v1/dns/forward/{hostname}
Example Request
import requests

response = requests.get(
    "https://ip-api.io/api/v1/dns/forward/dns.google",
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()

for addr in data["addresses"]:
    print(addr["type"], addr["address"])
Example Response
200
{
  "hostname": "dns.google",
  "addresses": [
    {
      "type": "A",
      "address": "8.8.8.8",
      "ttl": 300
    },
    {
      "type": "A",
      "address": "8.8.4.4",
      "ttl": 300
    }
  ]
}
Endpoint
GET /api/v1/dns/forward/{hostname}
Example Request
require "net/http"
require "json"

uri  = URI("https://ip-api.io/api/v1/dns/forward/dns.google")
req  = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
data = JSON.parse(Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }.body)

data["addresses"].each do |addr|
  puts "#{addr['type']}: #{addr['address']}"
end
Example Response
200
{
  "hostname": "dns.google",
  "addresses": [
    {
      "type": "A",
      "address": "8.8.8.8",
      "ttl": 300
    },
    {
      "type": "A",
      "address": "8.8.4.4",
      "ttl": 300
    }
  ]
}
Reverse Lookup

Reverse DNS API

Resolves an IP address to its PTR record and hostname. Returns structured JSON — no DNS parsing required on your end.

GET https://ip-api.io/api/v1/dns/reverse/{ip}
Live DNS queries — no caching
Returns hostname, PTR zone, and TTL; hostname is null if no PTR record exists
View Full Docs
Endpoint
GET /api/v1/dns/reverse/{ip}
Example Request
curl "https://ip-api.io/api/v1/dns/reverse/8.8.8.8" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example Response
200
{
  "ip": "8.8.8.8",
  "hostname": "dns.google",
  "ptr_record": "8.8.8.8.in-addr.arpa",
  "ttl": 300
}
Endpoint
GET /api/v1/dns/reverse/{ip}
Example Request
const response = await fetch(
  "https://ip-api.io/api/v1/dns/reverse/8.8.8.8",
  { headers: { Authorization: "Bearer YOUR_API_KEY" } }
);
const data = await response.json();

console.log(data.hostname);   // "dns.google"
console.log(data.ptr_record); // "8.8.8.8.in-addr.arpa"
console.log(data.ttl);        // 300
Example Response
200
{
  "ip": "8.8.8.8",
  "hostname": "dns.google",
  "ptr_record": "8.8.8.8.in-addr.arpa",
  "ttl": 300
}
Endpoint
GET /api/v1/dns/reverse/{ip}
Example Request
import requests

response = requests.get(
    "https://ip-api.io/api/v1/dns/reverse/8.8.8.8",
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()

print(data["hostname"])    # dns.google
print(data["ptr_record"])  # 8.8.8.8.in-addr.arpa
print(data["ttl"])         # 300
Example Response
200
{
  "ip": "8.8.8.8",
  "hostname": "dns.google",
  "ptr_record": "8.8.8.8.in-addr.arpa",
  "ttl": 300
}
Endpoint
GET /api/v1/dns/reverse/{ip}
Example Request
require "net/http"
require "json"

uri  = URI("https://ip-api.io/api/v1/dns/reverse/8.8.8.8")
req  = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
data = JSON.parse(Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }.body)

puts data["hostname"]    # dns.google
puts data["ptr_record"]  # 8.8.8.8.in-addr.arpa
Example Response
200
{
  "ip": "8.8.8.8",
  "hostname": "dns.google",
  "ptr_record": "8.8.8.8.in-addr.arpa",
  "ttl": 300
}
FAQ

Domain to IP Lookup — FAQs

What does a domain to IP lookup do?

It resolves a hostname — a website like example.com or a server name like mail.example.com — to the IP addresses its DNS publishes: the A records (IPv4) and AAAA records (IPv6), each with its time-to-live. It is the forward direction of DNS; the reverse DNS lookup goes from an IP back to a hostname.

What is the difference between A and AAAA records?

An A record maps a hostname to an IPv4 address (four numbers, like 93.184.216.34); an AAAA record maps it to an IPv6 address (eight hexadecimal groups). A website usually has at least one A record and, if it is reachable over IPv6, one or more AAAA records. The lookup shows both, grouped by type.

Why does a domain return several IP addresses?

Large sites and anything behind a CDN or a load balancer answer with several addresses so that traffic spreads across servers and regions, and the set can differ from one resolver or minute to the next. All of them are valid; which one a visitor uses is up to their resolver and client.

Why does a domain return no addresses?

Either the name does not exist, or it has no A/AAAA records (a domain used only for e-mail or as an alias may have MX or CNAME records but no addresses), or its DNS is misconfigured. The lookup says "no addresses found" in that case; a failed lookup (timeout, DNS error) is reported separately so you know the difference.

Website to IP, domain to IP, URL to IP — is it the same thing?

Yes, for the hostname part. A URL like https://www.example.com/page is resolved on its hostname www.example.com; the scheme and the path play no role. Note that www.example.com and example.com are different names and can point to different addresses.

Is there an API for domain to IP lookups?

Yes: GET /api/v1/dns/forward/{hostname} returns every A and AAAA record with its TTL, and GET /api/v1/dns/reverse/{ip} does the reverse direction. Both are documented below and metered like an IP lookup.

Pricing

Simple, transparent pricing

Start small, scale as you grow. No hidden fees.

Small
€10 /month
100,000 geo IP requests / month
10,000 advanced email validation requests
Reverse DNS lookup API access
Forward DNS lookup API access
Email support
99.9% uptime SLA
Get started
Large
€49 /month
1,000,000 geo IP requests / month
100,000 advanced email validation requests
Full WHOIS & DNS lookup suite
Full fraud detection suite
SLA & uptime guarantee
All datasets
Custom integrations
Dedicated support
Get started

Resolve hostnames at any scale

Domain to IP, website to IP and reverse DNS lookups through one simple REST API — every A and AAAA record with its TTL, in JSON.

> _
curl ip-api.io/api/v1/
rdns/8.8.8.8
PTR