# IP Ranges API update: Redirect destination of a domain

**URL:** <https://community.ipinfo.io/t/ip-ranges-api-update-redirect-destination-of-a-domain/5565>\
**Category:** Announcement\
**Tags:** api, ip-company, ip-ranges\
**Created:** [March 20, 2024, 6:46pm UTC](https://community.ipinfo.io/t/ip-ranges-api-update-redirect-destination-of-a-domain/5565 "2024-03-20T18:46:23Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Abdullah](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.ipinfo.io/abdullah/32/4973_2.png) [@Abdullah](https://community.ipinfo.io/u/Abdullah)\
**Post date:** [March 20, 2024, 6:46pm UTC](https://community.ipinfo.io/t/ip-ranges-api-update-redirect-destination-of-a-domain/5565/1 "2024-03-20T18:46:23Z")

</div>

The [IP range API](https://ipinfo.io/developers/ranges) is part of our [enterprise API service](https://ipinfo.io/pricing). The service returns the list of IP addresses a certain company operates based on their identifying domain.

 ![IP range API redirect to (3)](https://canada1.discourse-cdn.com/flex035/uploads/ipinfo/original/2X/6/6f0cb6b8c9f5246fc8ff73a60491f9dbb08c7635.png)

🔗 [IP Address Ranges API - IPinfo.io](https://ipinfo.io/developers/ranges)

> **[Documentation for IP Address Ranges API](https://ipinfo.io/developers/ranges)**
>
> We're the trusted source for IP address information, handling 50 billion IP geolocation API requests per month for over 1,000 businesses and 100,000+ developers

## What is identifying domain?

Organizations and companies can operate under different names and different ASNs. For that reason, we consider a single domain to be associated with their entire ecosystem. This is what we can call an **“identifying domain”**.

🔗 [How the domain field uniquely identifies organizations in the ASN and Company database - Docs / Database Downloads - IPinfo Community](https://community.ipinfo.io/t/how-the-domain-field-uniquely-identifies-organizations-in-the-asn-and-company-database/401)

For example, Amazon, AWS and other Amazon companies’ identifying domain would be `amazon.com`. By looking up `amazon.com` in the [Ranges API](https://ipinfo.io/developers/ranges) and the [IP to Company database](https://ipinfo.io/products/ip-company-database), you can get information on all the IP addresses they own across their entire mega-corporation.

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/ipinfo/original/2X/7/7656a0350ebbfa420c36ecfb8b95206c074ca1cc.png)

🔗 [Getting IP range information of a particular organization - Docs / Knowledgebase - IPinfo Community](https://community.ipinfo.io/t/getting-ip-range-information-of-a-particular-organization/2503)

## IP Ranges API support redirection

Even though the core data of the [IP ranges API](https://ipinfo.io/developers/ranges) is built on top of our [IP to Company ASN database](https://ipinfo.io/products/ip-company-database), it has one key differentiating point. The [IP range API](https://ipinfo.io/developers/ranges) can accept URLs that resolve to the target URL that matches the identifying domain of an organization.

Consider: `nytimes.com`. The [nytimes.com](http://nytimes.com) points to The New York Times organization, which owns many IP addresses. However, when you visit `times.com` you get redirected to `nytimes.com`. So, `nytimes.com` is the target website, identifying the domain of The New York Times organization.

```auto
SELECT *
FROM ip_company
WHERE domain='nytimes.com'

```

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/ipinfo/original/2X/9/96fde8d3dc1e23c2a44f9f903c969c36edf1f83e.png)

You can get the IP addresses of “The New York Times organization” by looking up `times.com` in the IP to Company database. You have to search for `nytimes.com`. However, the [IP Ranges API service](https://ipinfo.io/developers/ranges) can determine where the input IP resolves or redirects to, subsequently providing a list of IP addresses for that company.

Looking up `nytimes.com` (_identifying domain_) in the ranges API service:

```auto
curl https://ipinfo.io/ranges/nytimes.com?token=$TOKEN

```

```auto
{
    "domain": "nytimes.com", <--- input domain
    "redirects_to": null, <------ no redirects, input domain is identifying domain
    "num_ranges": 24,
    "ranges": [
        "80.4.179.80/28",
        "97.67.74.80/29",
        [....]
        "99.136.101.32/27",
        "97.66.54.216/29"
    ]
}

```

Looking up `times.com` (_redirecting domain_) in the ranges API service:

```auto
https://ipinfo.io/ranges/times.com?token=$TOKEN

```

```auto
{
    "domain": "times.com", <---------------- input domain
    "redirects_to": "nytimes.com", <-------- redirects to identifying domain
    "num_ranges": 24,
    "ranges": [
        "80.4.179.80/28",
        "97.67.74.80/29",
        [...]
        "99.136.101.32/27",
        "97.66.54.216/29"
    ]
}

```

## Understanding how the redirection mechanism of the ranges API

If you add a site that redirects to a popular site, you might be confused by seeing multiple IP addresses associated with that site. However, the IP addresses are associated with the redirecting domain, representing the organization behind the identified domain.

For example:

If a domain (1) redirects its users to its [Amazon.com](http://Amazon.com) (2) storefront, that does not mean that the company of that domain owns the ranges the API returns. The domain (1) resolves to [Amazon.com](http://Amazon.com) (2), which, operates all the ranges shown in the ranges API.

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/ipinfo/original/2X/6/63e499ccd33413c397afbcf379fada6a9066dd00.png)

Another example:

A person has set up a domain that redirects to their LinkedIn page. When we visit their website, we get redirected to their LinkedIn page. If we pass their domain (1) to the ranges API, it will return the final target website (2) information, which in this case is LinkedIn (2).

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/ipinfo/original/2X/8/8344a780b177d610eb1cafbb833553f93ef82d06.png)

---

_[View the full topic](https://community.ipinfo.io/t/ip-ranges-api-update-redirect-destination-of-a-domain/5565)._
