Updated on 2025-08-20 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 (Country/Region)

Level 3 (Province)

Asia Pacific

All regions, Taiwan (China), Hong Kong (China), Macao (China), Japan, South Korea, India, Türkiye, Indonesia, Vietnam, Singapore, Thailand, Malaysia, Bangladesh, UAE, Armenia, Azerbaijan, Bahrain, Brunei, Bhutan, Christmas Island, Georgia, Iraq, Jordan, Kyrgyzstan, Cambodia, Kuwait, Kazakhstan, Lebanon, Sri Lanka, Myanmar, Mongolia, Maldives, Nepal, Oman, Philippines, Pakistan, Palestine, Qatar, Saudi Arabia, Tajikistan, Timor-Leste, Turkmenistan, Uzbekistan, Yemen, Cyprus, Israel, American Samoa, Cook Islands, Federated States of Micronesia, Guam, Kiribati, Marshall Islands, Northern Mariana Islands, New Caledonia, Norfolk Island, Nauru, French Polynesia, Papua New Guinea, Palau, Solomon Islands, Tokelau Islands, Tonga, Tuvalu, Vanuatu, Samoa, Afghanistan, Laos, Iran, and Syria

Default

Europe

All regions, United Kingdom, Germany, France, Italy, Russia, Spain, Ukraine, the Netherlands, Sweden, Poland, British Indian Ocean Territory, Belarus, Andorra, Albania, Austria, Aland Islands, Belgium, Bulgaria, Switzerland, Czech Republic, Denmark, Estonia, Finland, Faroe Islands, Guernsey, Gibraltar, Greece, Croatia, Hungary, Ireland, Isle of Man, Iceland, Jersey, Liechtenstein, Lithuania, Luxembourg, Latvia, Monaco, Moldova, Montenegro, North Macedonia, Malta, Norway, Portugal, Romania, Serbia, Slovenia, Slovakia, San Marino, Vatican, Kosovo, Svalbard and Jan Mayen, and Bonaire, Sint Eustatius and Saba

Default

North America

All regions, United States, Canada, Mexico, Antigua and Barbuda, Barbados, Bahamas, Belize, Costa Rica, the Commonwealth of Dominica, the Dominican Republic, Grenada, Guatemala, Honduras, Haiti, Jamaica, Saint Kitts and Nevis, Cayman Islands, Saint Lucia, Nicaragua, Panama, Puerto Rico, El Salvador, Turks and Caicos Islands, Trinidad and Tobago, British Virgin Islands, U.S. Virgin Islands, Saint Vincent and the Grenadines, Saint Martin (French part), Saint Pierre and Miquelon, Cuba, Greenland, Martinique, and Sint Maarten (Dutch part)

Default

South America

All regions, Brazil, Argentina, Anguilla, Aruba, Saint Barthélemy, Bermuda, Guadeloupe, Montserrat, Bolivia, Chile, Colombia, Curaçao, Ecuador, French Guiana, Guyana, Peru, Paraguay, Suriname, Uruguay, and Venezuela

Default

Africa

All regions, South Africa, Egypt, Angola, Burkina Faso, Burundi, Benin, Botswana, Congo-Kinshasa, Central African Republic, the Republic of Congo, Côte d'Ivoire, Cameroon, Cape Verde, Djibouti, Algeria, Eritrea, Ethiopia, Gabon, Ghana, Gambia, Guinea, Equatorial Guinea, Guinea-Bissau, Kenya, Comoros, Liberia, Lesotho, Libya, Morocco, Madagascar, Mali, Mauritania, Mauritius, Malawi, Mozambique, Niger, Nigeria, Reunion, Rwanda, Seychelles, Sierra Leone, Senegal, Somalia, South Sudan, Sao Tome and Principe, Eswatini, Chad, Togo, Tunisia, Tanzania, Uganda, Mayotte, Zambia, Zimbabwe, Namibia, and Sudan

Default

Oceania

All regions, Australia, New Zealand, Fiji, Wallis and Futuna, and Niue

Default

Antarctica

All regions

Default

Chinese mainland

All regions

-

North China

Default, Beijing, Tianjin, Hebei, Shanxi, and Inner Mongolia

Northeast China

Default, Liaoning, Jilin, and Heilongjiang

Northwest China

Default, Shaanxi, Gansu, Qinghai, Ningxia, and Xinjiang

Central China

Default, Henan, Hubei, and Hunan

East China

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

South China

Default, Guangdong, Hainan, and Guangxi

Southwest China

Default, 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

    Alias

    Whether to associate the record set with a cloud resource.

    Unlike a CNAME record set, an alias supports second-level domain names.

    This option is disabled by default.

    Types of record sets that support alias include A, MX, AAAA, TXT, SRV and CAA.

    No

    No

    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: _.:/=+-@
    NOTE:

    If your organization has configured tag policies for the DNS service, you need to add tags to your record sets based on the tag policies. If you add a tag that does not comply with the tag policies, record sets may fail to be created. Contact the administrator to learn more about tag policies.

    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.