Intelligent resolution

Updated at:

Unlike traditional DNS, which returns IP addresses randomly regardless of visitor origin, intelligent resolution routes visitors to specific IP addresses based on their location, reducing latency and improving access speed.

Overview

Intelligent resolution identifies visitor origin and returns the most appropriate IP address. For example, if www.cloud-example.com has servers at China Unicom, China Mobile, and China Telecom, intelligent resolution routes each visitor to their ISP's server.

How it compares to traditional DNS:

Intelligent resolution

Traditional DNS

Configuration

  • Set the query source to Default and point it to China Unicom IP address (192.x.x.1).

  • Set the query source to China Mobile and point it to China Mobile IP address (192.x.x.2).

  • Set the query source to China Telecom and point it to the China Telecom IP address (192.x.x.3).

  • Point the domain to the China Unicom IP address (192.x.x.1).

  • Point the domain to the China Mobile IP address (192.x.x.2).

  • Point the domain to the China Telecom IP address (192.x.x.3).

Resolution result

Alibaba Cloud DNS identifies the visitor's origin:

  • Returns 192.x.x.2 to visitors on China Mobile.

  • Returns 192.x.x.3 to visitors on China Telecom.

  • Returns 192.x.x.1 to visitors from all other origins.

Traditional DNS does not identify the visitor's origin:

It returns all three IPs (192.x.x.1, 192.x.x.2, 192.x.x.3) to the local DNS resolver, which randomly or preferentially selects one. This may cause cross-ISP access.

How it works

When determining visitor origin for traffic routing, Alibaba Cloud DNS prioritizes the client IP address carried in the edns-client-subnet (ECS) extension of the EDNS query packet. If ECS is not present, it uses the egress IP address of the Local DNS resolver that queries Alibaba Cloud DNS, rather than the end-user's client IP. This breaks down into the following three scenarios:

Scenario 1: The query packet carries ECS

Alibaba Cloud DNS supports the ECS extension and prioritizes the IP address in the ECS to identify the visitor's geographic location and return the resolution result of the corresponding line.

Note

A local DNS resolver that supports EDNS does not necessarily encapsulate the client's source IP into ECS. EDNS is a DNS extension mechanism where ECS is an optional feature. Whether the resolver carries the client IP depends on whether it has enabled this feature. Some resolvers do not carry the real client IP for privacy protection. If the query message received by the resolver carries ECS, the resolver forwards the extension as-is, and Alibaba Cloud DNS prioritizes the ECS IP for intelligent resolution. Otherwise, it uses the egress IP address of the resolver.

Scenario 2: The query packet does not carry ECS

The local DNS resolver sends iterative queries to Alibaba Cloud DNS, which determines the visitor's geographic location based on the resolver's egress IP address. This case applies when the resolver does not support EDNS, or when it supports EDNS but has not enabled ECS.

Scenario 3: The local DNS resolver forwards queries through a secondary recursive node

The visitor queries the Local DNS resolver, which forwards the request to a secondary recursive node that then queries Alibaba Cloud DNS. If the packet does not carry ECS, Alibaba Cloud DNS determines the visitor's origin based on the egress IP address of the secondary recursive node and returns the resolution result of the corresponding fine-grained line. If the forwarded packet includes ECS, the ECS IP is prioritized as described in Scenario 1.

Note

Because the secondary recursive node may be in a different region or ISP than the client, the resolution result may deviate from the visitor's actual location, resulting in cross-ISP access even after intelligent resolution lines are configured. For troubleshooting, see Troubleshoot inaccurate intelligent resolution routing.

image

Supported lines

Resolution lines are organized into multiple levels. You can configure intelligent resolution rules at either a broad or granular line level.

Line

Level 1 category

Level 2 category

Level 3 category

Region

Chinese Mainland, Outside Chinese Mainland

Northeast China, North China, Asia, Europe, etc.

Beijing

ISP

China Mobile, China Unicom, etc.

Northeast China, North China, etc.

Beijing

Cloud Provider

Alibaba Cloud

Chinese Mainland, Outside Chinese Mainland

Northeast China, North China, etc.

Search Engine

Google, Bing

Chinese Mainland, Outside Chinese Mainland

-

Custom

Custom

-

-

For details, refer to Lines.

Resolution priority

When multiple rules match a visitor, Alibaba Cloud DNS applies the following priority:

  1. Line priority (highest to lowest): Custom > Search Engine > Cloud Provider > ISP > Region > Default

  2. Within each line category, more granular lines take higher priority. For example, Beijing has higher priority than North China, and North China has higher priority than Chinese Mainland.

  3. Always configure a default line. The default line is the fallback when no other rule matches. Set at least one DNS record for the default line to prevent resolution failures.

Pricing

Important

Intelligent resolution is free of charge. However, the available lines vary based on your DNS edition.

  • Enterprise Standard and Enterprise Ultimate: All lines are available. To purchase, see Purchase and attach domain names.

  • Free Edition: Only top-level line categories are available (such as Level 1 region lines). Granular line classifications are not supported.

Examples

Example 1: Route by ISP

Assume www.cloud-example.com has servers at three ISPs: China Telecom, China Unicom, and China Mobile. Target routing:

  • Visitors from China Unicom or other ISPs receive 192.168.0.1 (China Unicom server)

  • Visitors from China Mobile receive 192.168.0.2 (China Mobile server)

  • Visitors from China Telecom receive 192.168.0.3 (China Telecom server)

Steps:

  1. Go to the Alibaba Cloud DNS - Public Zone page. Find the domain that you want to manage and click its name. Then, click the Settings tab.

  2. On the Settings tab, click Add Record.

  3. Add three DNS records as described in the following table:

    Hostname

    Type

    Query source

    Record value

    www

    A

    China Mobile

    192.168.0.2

    www

    A

    China Telecom

    192.168.0.3

    www

    A

    Default

    192.168.0.1

Example 2: Route by region

Assume that the domain name test.cloud-example.com is resolved to three IP addresses located in Zhejiang, Guangdong, and Beijing. The expected results are as follows:

  • Visitors from regions other than South China or North China receive 192.168.0.7 (default server)

  • Visitors from South China receive 192.168.0.8 (Guangdong server)

  • Visitors from North China receive 192.168.0.9 (Beijing server)

Steps:

  1. Go to the Alibaba Cloud DNS - Public Zone page. Find the domain that you want to manage and click its name. Then, click the Settings tab.

  2. On the Settings tab, click Add Record.

  3. Add three DNS records as specified in the following table.

    Hostname

    Type

    Query source

    Value

    www

    A

    Chinese Mainland > South China

    192.168.0.8

    www

    A

    Chinese Mainland > North China

    192.168.0.9

    www

    A

    Default

    192.168.0.7

FAQ

Intelligent resolution FAQ