Overview
After you configure a geographical location-based access policy for a Global Traffic Manager (GTM) instance, domain names are resolved based on the DNS records for global lines instead of those for regional lines as you expected. This topic describes the causes of this issue and provides solutions.
Troubleshooting
In this example, the domain name cloud-example.com
, GTM instance gtm-cn-lbj3hr836**
, and business domain name www.cloud-example.com
are used.
Geographical location-based access policies configured for the GTM instance
Three access policies are configured respectively for global DNS requests, DNS requests from the China (Guangdong) region, and DNS requests from the China (Beijing) region.
Basic settings of the GTM instance
The suffix of the CNAME of the GTM instance is cloud-example.com
.
GTM is mainly used to implement health checks and failover. The domain name resolution capability of GTM is implemented based on Alibaba Cloud DNS (DNS). Therefore, the version and line settings of the DNS instance to which the domain name cloud-example.com
is bound determine whether the DNS request source and time-to-live (TTL) settings of the GTM instance are effective.
Mapping of the business domain name www.cloud-example.com
to the CNAME of the GTM instance
Line type for the CNAME of the GTM instance
By default, the line for cloud-example.com
is an Internet service provider (ISP) line.
Causes of ineffective DNS records for regional lines
The GTM instance is configured with access policies for the South China_Guangdong and North China_Beijing regional lines, but the CNAME of the GTM instance is configured with the default ISP line. Due to the inconsistency, the DNS records for the regional lines become ineffective and the DNS instance resolves domain names requested from regional sources based on the DNS records for global lines.
When you configure an ISP line for the CNAME of the GTM instance in DNS, if you configure access policies for ISPs, Alibaba Cloud regions, and regions outside the Chinese mainland, or their subdivisions, the corresponding DNS records are effective. However, if you configure access policies for regions in the Chinese mainland or their subdivisions, the corresponding DNS records are ineffective. For more information about the regions, see DNS resolution lines.
Solutions
Solution 1
Switch the line type of the CNAME of the GTM instance to Regional Line in the DNS console. For more information, see Switch the line type.
If a subdomain name of the CNAME is configured with DNS records for ISPs or Alibaba Cloud regions, do not switch the line type. Otherwise, the DNS records of the corresponding line is disabled and the weight settings become invalid. In this case, refer to Solution 2.
The DNS records for the default line, lines outside the Chinese mainland, search engine lines, and custom lines are not affected.
You can switch the line type only for domain names that are bound to a DNS instance of the Enterprise Standard Edition or Enterprise Ultimate Edition.
Solution 2
In cases where the DNS records for personalized lines are disabled when the line type is switched, you can separately host a subdomain on DNS, bind the subdomain name to a DNS instance of Enterprise Standard Edition or Enterprise Ultimate Edition, and switch the line type of the subdomain name to Regional Line.
Procedure
Log on to the DNS console.
Configure separate hosting for the business domain name
www.cloud-example.com
. For more information, see Manage subdomains.Associate
www.cloud-example.com
with a DNS instance of Enterprise Standard Edition or Enterprise Ultimate Edition. For more information, see the Bind a domain name section of the "Purchase Alibaba Cloud DNS and bind a domain name" topic.Switch the line type of
www.cloud-example.com
to Regional Line. For more information, see Switch the line type.On the Basic Settings page of the GTM instance, click Modify and change the suffix of the CNAME to
www.cloud-example.com
.On the DNS Settings page, add a DNS record to map
www.cloud-example.com
to the CNAME of the GTM instance. Set the Record Type parameter to CNAME, the Hostname parameter to @, the DNS Request Source parameter to Default, and the Record Value parameter to gtm-cn-lbj3hr836**.cloud-example.com, which is the CNAME used to access the GTM instance.NoteThe parameter values are only for your reference. Configure the parameters based on the actual situation.