This topic provides answers to some frequently asked questions about Alibaba Cloud Public DNS.
Q1: Which HTTP versions does Public DNS support?
A: Public DNS supports HTTP/1.1 and HTTP/2.
Q2: Does the JSON API for DNS over HTTPS (DoH) of Public DNS support Chinese domain names?
A: No, the name parameter of the JSON API for DoH cannot be set to a Chinese domain name. Clients must use Punycode to encode Chinese domain names.
Q3: If DNS over TLS (DoT) is enabled for Public DNS, can an IP address be used as the host in a Uniform Resource Identifier (URI)?
A: Only an IPv4 address can be used as the host in a URI. IPv6 addresses cannot pass certificate verification.
Q4: How do I deactivate Public DNS in the Alibaba Cloud DNS console?
A: If you are using Public DNS of the free edition, you can replace the DNS server addresses on your terminal with other addresses to deactivate the service.
If you are using Public DNS of the paid edition or you have activated Public DNS in the Alibaba Cloud Management console, you cannot actively deactivate this service. The billing method of the service is pay-as-you-go. You are charged only for resources that you used. If you no longer use public DNS service, no additional fee is charged.
Q5: Does Public DNS support DNS Security Extensions (DNSSEC)?
A: No, Public DNS does not support DNSSEC.
Q6: Can I use Public DNS outside the Chinese mainland?
A: Public DNS can be accessed by using anycast IP addresses worldwide. This allows you to access the nearest service clusters anywhere in the world.
Q7: Does Public DNS support the Anti-DDoS feature?
A: Yes, the Anti-DDoS feature is available for all users.
Q8: What do I need to take note of when I call the JSON API for DoH of Public DNS in cross-origin resource sharing (CORS) mode?
A: By default, the credentials parameter is set to same-origin. Do not pass any custom headers in the request header.
Sample code:
// You can leave the credentials and headers parameters empty to use the default values.
fetch('http://dns.alidns.com/resolve?uid=9999&type=28&name=www.taobao.com', {
credentials: 'same-origin',
headers: {}
});Q9: What are the cache update mechanisms of the Alibaba Cloud Public DNS SDK?
A: The SDK supports three types of cache update mechanisms for DNS records.
1. The cache never expires. After you obtain a DNS result returned for the first DNS request for a domain name including the DNS result obtained by using the preloading mechanism, the obtained DNS result is cached in the app and does not expire or is updated. The cached DNS result is returned when subsequent DNS requests from the app for the domain name are initiated. New DNS results are not obtained unless the network environment changes.
2. The cache is passively updated. After you obtain a DNS result returned for the first DNS request for a domain name including the DNS result obtained by using the preloading mechanism, the obtained DNS result is cached. The cached DNS result is returned when subsequent DNS requests for the domain name are initiated. If the time to live (TTL) period of the cached DNS result expires when a DNS request is initiated, the cached DNS result is still returned for the DNS request and the DNS result is updated later.
3. The cache is actively updated. After you obtain a DNS result returned for the first DNS request for a domain name including the DNS result obtained by using the preloading mechanism, the obtained DNS result is cached. The domain name is resolved again to update the cached DNS result when 75 percent of the TTL period of the cached DNS result elapses.