• A traditional DNS resolution is implemented by accessing the local DNS of a carrier in order to obtain the resolution result. However, this action can easily allow for DNS hijacking, DNS errors, and inter-network traffics, and lead to slowed, or failed, website access.
  • httpDNS is a DNS service that uses HTTP protocol to directly access the Alibaba Cloud CDN server. Because it bypasses the carrier's local  DNS, it can avoid DNS hijacking and obtain real-time accurate DNS resolution results.
  • Principle: Initiate a request to access a designated Alibaba Cloud CDN httpDNS server through HTTP protocol. The httpDNS server performs domain resolution based on second-level DNS nodes distributed everywhere, obtains the domain name resolution result, and returns the result.

httpDNS interface

Direct access through an HTTP interface is supported. The access method is as follows.
  1. Service URL
  2. Request method: POST
  3. Supported parameter: client_ip=x.x.x.x. This parameter can be ignored if the IP address of the client initiating the httpDNS request is used.
  4. Request example: Multiple domains to be resolved are placed in the body of a POST request and are separated by whitespaces (blank spaces, TABs, newline characters).
    #curl '
    ' -d ''
  5. Returned format: json data is returned. After resolution, domain IP addresses are extracted and polling can be performed among them. TTL cache and expiration rules must be followed.
  6. Request example with multiple domains
    • Request example
      #curl '
      ' -d ''
    • Return example