Updated on 2025-08-19 GMT+08:00

Configuring Region Lines

Background

Usually, a DNS server returns the same IP address to all visitors, irrespective of where they come from. This may cause high latency in cross-region access.

If you configure region lines when you create record sets, the DNS server returns different IP addresses to visitors based on their locations.

Region lines can be used only in public zones. You cannot specify region lines for private zones or PTR records.

For example, you have built a website using domain name example.com and hosted the website on two servers, one in Chinese mainland and the other in a region outside the Chinese mainland. You need to configure three lines: Default, Region > Chinese Mainland, and Region > Abroad.

Region Lines

Region lines are categorized by geographic areas, as shown in Table 1.

Table 1 Region lines

Level 1

Level 2

Level 3

Chinese Mainland

All regions

Default

North China

Beijing, Tianjin, Hebei, Shanxi, and Inner Mongolia

Northeast China

Liaoning, Jilin, and Heilongjiang

Northwest China

Shaanxi, Gansu, Qinghai, Ningxia, and Xinjiang

Central China

Henan, Hubei, and Hunan

East China

Shanghai, Jiangsu, Zhejiang, Anhui, Fujian, Jiangxi, and Shandong

South China

Guangdong, Hainan, and Guangxi

Southwest China

Chongqing, Sichuan, Guizhou, Yunnan, and Xizang

Abroad

All regions

Default

Suppose you have configured the following resolution lines for example.com:

  • Default: 1.1.1.1
  • Chinese Mainland: 2.2.2.2
  • Asia-Pacific_Hong Kong (China): 3.3.3.3

When a visitor in Shanghai requests the domain name example.com, IP address 2.2.2.2 is returned. When a visitor in Hong Kong requests this domain name, IP address 3.3.3.3 is returned. When a visitor in New Zealand requests this domain name, IP address 1.1.1.1 is returned.

Procedure

Configure region lines for your public domain names hosted on the DNS service.

The following describes how to configure a Default line to map the domain name to 1.1.1.1 and an Asia-Pacific _Hong Kong (China) line to map the domain name to 3.3.3.3.

  1. Go to the Public Zones page.
  2. On the Public Zones page, click the domain name (example.com) of the public zone.
  3. Click Add Record Set.

    The Add Record Set dialog box is displayed.

  1. Add two A record sets for example.com. Configure the parameters based on Table 2.
    Table 2 Parameters for adding an A record set

    Parameter

    Description

    Line 1

    Line 2

    Type

    Record set type.

    Select a record set type based on service requirements.

    For details, see Table 1.

    An A record set is selected here.

    A – Map domains to IPv4 addresses

    A – Map domains to IPv4 addresses

    Name

    Prefix of the domain name to be resolved.

    This value is left empty by default.

    For example, if the domain name is example.com, the value of the Name can be as follows:

    • www: The domain name is www.example.com and usually used for a website.
    • Left blank: The domain name is example.com and usually used for a website.

      To use an at sign (@) as the domain name prefix, just leave this parameter blank.

    • abc: The domain name is abc.example.com, a subdomain of example.com.
    • mail: The domain name is mail.example.com and usually used for email servers.
    • *: The domain name is *.example.com. It covers all subdomains of example.com.

    www

    www

    Line

    Resolution line. The DNS server will return the IP address of the specified line, depending on where end users come from.

    The default value is Default.

    • Default: returns the default resolution result irrespective of where the visitors come from.
    • ISP: returns the resolution result based on end users' carrier networks. For details, see Configuring ISP Lines.
    • Region: returns the resolution result based on end users' geographical locations. For details, see Configuring Region Lines.

    Default

    Select Region and Asia Pacific > Hong Kong (China).

    TTL (s)

    How long a local DNS server caches a DNS record. It is measured in seconds.

    Default value: 300

    Value range: 1 to 2147483647

    If your service address changes frequently, set TTL to a smaller value. Otherwise, set TTL to a larger value.

    Default value: 300

    Default value: 300

    Value

    Returned result of domain name resolution.

    For details, see Table 1.

    1.1.1.1

    3.3.3.3

    Weight

    Weight for the record set.

    Default value: 1

    Value range: 0 to 1000

    If a resolution line in a zone contains multiple record sets of the same type, you can set different weights to each record set. For details, see Configuring Weighted Routing.

    1

    1

    Tag

    Identifier of the record set. Each tag contains a key and a value.

    You can add up to 20 tags for a record set.

    Tag key. The key:

    • Cannot be left blank.
    • Must be unique for each resource.
    • Can contain a maximum of 128 characters.
    • Cannot start or end with a space, or cannot start with _sys_. Only letters, digits, spaces, and the following special characters are allowed: _.:=+-@

    Tag value. The value:

    • Can be left blank.
    • Can contain a maximum of 255 characters.
    • Only letters, digits, spaces, and the following special characters are allowed: _.:/=+-@

    example_key1

    example_value1

    example_key1

    example_value1

    Description

    Supplementary information about the record set.

    The description can contain a maximum of 255 characters.

    -

    -

  2. Click OK.