All Products
Search
Document Center

Alibaba Cloud DNS:Implement region-based intelligent DNS resolution with GTM

Last Updated:Aug 26, 2026

Scenario

Use Global Traffic Manager (GTM) to direct users to the nearest application service when your services are deployed across multiple regions. GTM can also automatically fail over to another region if a service becomes unavailable. To do this, add your business domain name to GTM and configure intelligent DNS resolution based on regional lines.

Preparation

  • Your domain cloud-example.com is hosted on Alibaba Cloud DNS. The subdomain managed by GTM is www.cloud-example.com.

    Note

    If your domain uses a third-party DNS provider, add a CNAME record pointing to the GTM access zone name in that provider's console.

  • A GTM instance is available. If not, purchase a subscription instance.

  • Intelligent resolution goal:

    DNS query source

    Application service endpoint

    Failover endpoint

    South China

    1.1.XX.XX

    3.3.XX.XX

    North China

    2.2.XX.XX

    3.3.XX.XX

    Global

    3.3.XX.XX

    1.1.XX.XX, 2.2.XX.XX

Solution architecture

image

Procedure

  1. Go to the Alibaba Cloud DNS - Global Traffic Manager console.

  2. On the Access Domain tab, click Create Access Domain.

  3. In the Select Scenario dialog box, select Custom Scenario.

  4. On the Create Access Domain page, click the access zone name icon and select Basic Configuration.

  5. On the Basic Configuration page, set the required parameters and click Submit. For details, see Configure an access zone name.

  6. On the Access Domain page, click the address pool icon and create three address pools: China south, China north, and Global. image

  7. On the Access Domain page, click the address icon and select Basic Configuration. Add the endpoint IP address, configure a health check template (for this example, TCP protocol, port 80), and create the address. Repeat for all required addresses.

    Note

    If no health check template exists, click Add Health Check Template. For details, see Health check templates.

    Important

    If you encounter red or orange alerts during setup, check the health status of your addresses.

  8. Click the load balancing policy name under the website config icon and select Configure Load Balancing Policy. To implement a location-based policy, set the load balancing policy between address pools to Nearest Source. For more information, see Set load balancing policies. In the Query Source section, set Query Source to South China, North China, and Global for the three address pools.

    Important
    • Regional lines are available under the Region - China path and include province-specific lines.

    • To ensure that clients from unmatched source lines are resolved to an address, configure a Default line.

    • If an address pool for an intelligent line is unavailable, GTM responds with an address from the global default line.

    • If all address pools are unavailable, GTM responds with all addresses from the global default address pool using polling. If the default line has multiple address pools, GTM selects the non-empty address pool with the smallest ordinal number. If no global default line exists, GTM uses the non-empty address pool with the smallest ordinal number.

    image

  9. Click the load balancing policy name under the address pool icon and select Configure Load Balancing Policy. To implement active-standby disaster recovery, select Preemptive Mode. For more information, see Address pool configuration.

    Important
    • The smaller the ordinal number of an address, the higher its resolution priority. An address with a larger ordinal number is used only when addresses with smaller ordinal numbers are unavailable.

    • The ordinal number of an address pool serves two purposes. First, for requests from the same source, the address pool with the smaller ordinal number has higher priority. Second, if all address pools become unavailable, GTM returns all IP addresses from the non-empty address pool with the smallest ordinal number.

    image

    Important

    This example shows the configuration process. If you see red or orange alerts during configuration, promptly troubleshoot the health status of the addresses.

  10. Configure alert rules for the instance. For details, see Configure alerts.

  11. On the Access Domain page, click the access zone name icon and select Enable.

  12. In the confirmation dialog box, verify the details and click OK to enable the Access Domain.

    Important
    • If a DNS record with the same name and type already exists in Alibaba Cloud DNS, GTM policies take precedence over standard domain name resolution for that domain.

    • If the GTM instance is disabled or deleted, DNS queries fall back to Alibaba Cloud DNS Public Zone records.