All Products
Search
Document Center

HTTPDNS:Batch domain name resolution

Last Updated:Dec 17, 2025

Before you begin, read the Single domain name resolution document. This document describes the HTTPDNS access API operation and provides important integration details.

This document describes only the request and response formats for the batch domain name resolution API operation.

1. API request format

Warning

When you use the HTTP API, you must review the Best practices to prevent service failures.

Request method: GET

Service URL: http://203.107.XXX.XXX/{account_id}/resolve (For a list of service IPs, see Scheduling service API)

URL parameters:

Name

Required

Description

host

Required

The domain names to resolve. Separate multiple domain names with a comma (,). A single request can contain a maximum of 5 domain names.

ip

Optional

The source IP address of the user. If this parameter is not specified, the source IP of the connection is used by default. To specify multiple IP addresses, separate them with a comma (,). A single request can contain a maximum of 5 IP addresses.

Request examples:

  • Resolve multiple domain names: http://203.107.XXX.XXX/100000/resolve?host=www.aliyun.com,www.taobao.com

  • Specify multiple source IP addresses: http://203.107.XXX.XXX/100000/resolve?host=www.aliyun.com&ip=42.120.XXX.XXX,218.16.XXX.XXX

Important

A single request cannot resolve multiple domain names and specify multiple IP addresses at the same time. The number of domain names and IP addresses for batch resolution is limited. If your requirements exceed these limits, submit a ticket.

2. API response format

The following is a sample response in JSON format:

{
  "dns": [
    {
      "host": "www.aliyun.com",
      "client_ip": "192.168.xx.xx",
      "ips": [
        "192.168.xx.xx"
      ],
      "ttl": 106,
      "origin_ttl": 120
    },
    {
      "host": "www.taobao.com",
      "client_ip": "192.168.xx.xx",
      "ips": [
        "192.168.xx.xx"
      ],
      "ttl": 46,
      "origin_ttl": 60
    }
  ]
}

The response for the batch domain name resolution API operation includes the client_ip field, which indicates the source IP of the client. For descriptions of the other fields in the response, see Single domain name resolution.

3. Status codes

HTTP status code

Error code

Description

400

LimitExceeded

Too many domain names were passed to the batch resolution API operation. A single request can contain a maximum of 5 domain names.