All Products
Search
Document Center

HTTPDNS:Overview

Last Updated:Jun 16, 2026

HTTPDNS custom resolution lets you return specific DNS results for a domain name by configuring rule-based or Function Compute-based policies.

About custom resolution

If you need to return specific DNS resolution results for a domain name, you can configure custom resolution using rules or Alibaba Cloud Function Compute.

Custom resolution is not supported for domains resolved over DNS over HTTPS (DoH).

Scenarios

  • Canary testing: Suppose your domain is www.example.com. You launched a new service with IP address 1.1.X.X. Before full rollout, you want to run a canary test for users in the China Telecom Shanghai region. For those users, DNS queries for www.example.com must return 1.1.X.X.

  • Traffic routing: Suppose an automotive company uses www.example.com as its service domain. It wants DNS resolution to return IP addresses of servers in different regions, based on business logic. For example, it returns the IP address of a server in Guangzhou for vehicles registered in Guangzhou. When a vehicle registered in Guangzhou queries www.example.com, the DNS query returns the IP address of the Guangzhou server.

Overall usage flow

image

1. Add a domain

  • Log on to the EMAS console or the .

  • Choose Resolution Management > Domains. Add the domain that you want to resolve.

    image

2. Add Custom Parsing

3. Pass custom parameters from the client (optional)

4. Activate the policy

A policy does not take effect immediately after you add it. Turn on the toggle in the Status column to activate it.

Important

Activating a policy is a critical operation. A confirmation dialog appears before activation. Risk control verification may also be required. If so, enter the CAPTCHA.

image

5. Validate resolution results

After configuration, test resolution results using the online test tool. For details, see Test custom resolution functions online.

6. Manage custom resolution policies (optional)

After you add a custom resolution policy, you can deactivate or delete it. For details, see Manage custom resolution policies.

Policy description

When to use each policy type

  • Use rule policies when: Your requirements are clear and the logic is simple. Examples include routing by ISP or region, or by device type. No real-time dynamic computation is needed.

  • Use Function Compute policies when: You need complex logic. Examples include load balancing, real-time decision making, or multi-condition evaluation.

Rule policies

A rule policy defines custom resolution behavior through matching rules. By setting different resolution parameters for specific network lines, you route traffic from different ISPs and regions to different service endpoints.

Follow this procedure:

  • In the HTTPDNS console, create a custom resolution rule policy for a domain.

  • When the client sends a DNS query request using the SDK or HTTP API, include the required custom resolution parameters.

  • The HTTPDNS server receives the request and returns the best-matching resolution result based on your rules.

For step-by-step instructions, see Configure rule-based custom resolution.

The rule policy resolution flow:

image

Function Compute policies

A Function Compute policy routes domain traffic through Alibaba Cloud Function Compute, offering more flexibility than rule policies. You write your business logic in a Function Compute function and configure it as the resolution hook. For step-by-step instructions, see Configure Function Compute–based custom resolution.

The Function Compute architecture:

image

How rule policies and Function Compute policies work together

image