HTTPDNS provides domain name resolve services over the HTTP interface, with features such as domain name anti-hijacking, precise scheduling, and real-time resolution.


  • Enable DNS in the global configuration / DNS page:

  • Add a partition port in the Global Configuration/Configure Partition Port page and select httpdns as the type:

  • Adding an HTTP/HTTPS application to the Application page:

  • Add upstream to the application, select the loopback address of the node upstream, and enter the httpdns partition port from the httpdns port added in the step above:

  • Adding Page Rules to the application:

    • Set the HTTP header so that httpdns gets the client IP correctly. Select Action, add action Set Proxy Header, fill in X-Real-IP in the header, and set the value to Built-In Variable - Client Address.

    • Select Proxy, upstream select the upstream added in the previous step.

At this point, the HTTPDNS configuration is complete, add DNS applications and records to DNS and you can use HTTPDNS for queries.


Request URL:http://{your app}/?host={your domain}&query=4,6&ip={client ip}

Request method:GET

Request parameters:

hostyesthe domain name to resolve.
ipnoSource IP of customer, If this parameter is not specified, the source IP of the requested connection is used by default.
querynoSpecifies the type of the resulting IP, either 6(IPv6) or 4(IPv4). The default is 4.
typeNoSpecifies the format of the query result, currently only “json” is supported.


hostDomain to Query
ipsThe resolved IPv4 result of the domain, it’s a list, may contain 0, 1 or more IP address.
ipsv6The resolved IPv6 result of the domain, it’s a list, may contain 0, 1 or more IP address.
ttlThat domain resolve result TTL cache time
origin_ttlThe original TTL for the domain name, i.e., the TTL value for the domain name configured on the authoritative NS.

Error code:

Error codeHTTP StatusDescription
MethodNotAllowed405The HTTP request method is not allowed.
MissingArgument400Missing query parameters, such as host.
UnsupportedType400The URL parameter type specifies a type that is not supported.
InvalidHost400The URL parameter host specifies an invalid domain name.
InvalidIP400The client IP specified by the URL parameter IP is invalid.
InvalidQuery400The version of IP specified by the URL parameter query is invalid.
InternalError500Server internal errors.
QueryError500Domain name search error.

Query examples

Example of a single result query: A single result query when only a single host and a single IP are specified.

  • Request Example 1:
  • Request Example 2:
  • Request Example 3:
  • Request Example 4:,6

Response examples:

    "client_ip": "",
    "ips": [""],
    "host": "",
    "ttl": 300,
    "origin_ttl": 300

Example of a multi-result query: A multi-result query when multiple hosts or multiple IP are specified.

  • Request examples 1:,
  • Request examples 2:,,6
  • Request examples 3:,,,6
  • Request examples 4:,,6

Response examples:

    "dns": [{
        "client_ip": "",
        "ipsv6": {},
        "host": "",
        "ttl": 300,
        "ips": {}
    }, {
        "client_ip": "",
        "ipsv6": {},
        "host": "",
        "ttl": 300,
        "ips": {}