FAQ

更新时间:
复制 MD 格式

Frequently asked questions about HTTPDNS, including protocol support, DoH API usage, billing, and caching.

What HTTP protocol versions does HTTPDNS support?

HTTPDNS supports HTTP 1.1 and HTTP 2.0.

Does the HTTPDNS DoH JSON API support Chinese domain names?

Chinese domain names cannot be passed directly to the name parameter of the DoH JSON API. Encode them into Punycode on the client side first.

When accessing the HTTPDNS service over TLS, can I use an IP address for the host in the URI?

Yes. IPv4 addresses are supported, but IPv6 addresses cannot pass certificate authentication.

How do I disable HTTPDNS after I enable it in the Cloud DNS console?

This pay-as-you-go service cannot be manually disabled. No fees are generated after you stop using it.

Does HTTPDNS support DNSSEC?

No. DNSSEC validation is disabled.

Can I use HTTPDNS outside China?

Yes. HTTPDNS provides global Anycast IP addresses for nearest-location access worldwide.

Does HTTPDNS provide DDoS mitigation capabilities?

Yes. The DDoS mitigation capability is shared among all users.

What do I need to know when I call the HTTPDNS DoH JSON API using CORS?

  1. Set the credentials option to same-origin, which is the default value.

  2. Do not include custom headers in the request header.

Example code:

// You can omit credentials and headers. They use default values.
fetch('http://dns.alidns.com/resolve?uid=9999&type=28&name=www.taobao.com', {
  credentials: 'same-origin',
  headers: {}
});

What is the cache update mechanism of the HTTPDNS SDK?

The SDK supports three DNS record cache update mechanisms:

  1. Cache never expires: After the initial DNS resolution, the result is cached and reused for all subsequent requests to the same domain name. The cache does not expire or update while the application is running. A new resolution is triggered only when the network environment changes.

  2. Passive cache update: A cache is created after the initial DNS resolution. When a subsequent request hits an expired cache entry, the system returns the stale result immediately and refreshes the cache in the background.

  3. Active cache update: A cache is created after the initial DNS resolution. When the remaining TTL drops to 25%, the system automatically resolves the domain name again to refresh the cache.