Note:
- If you don't use the SDK, you need to retain the local DNS as a backup during connection. For more information, see Best Practice of API Connection.
- Currently, only the DES encryption method is available (service IP:
43.132.55.55
). HTTPS and AES encryption methods are not available.
First, you need to activate HTTPDNS in the HTTPDNS console as instructed in Activating HTTPDNS.
After activating HTTPDNS, you need to add a domain to be resolved in the HTTPDNS console as instructed in Adding a Domain before you can use it.
After activating the service, you will be assigned the configuration information such as authorization ID, AES and DES encryption keys, and HTTPS token, which can be viewed in the HTTPDNS console. For more information, see Configuration Information Description.
After getting the authorization ID, encryption key, and HTTPS token, you can request DNS query in the following ways:
Note:
- DNS query encrypted with DES, which is fast
- DNS query encrypted with AES, which delivers balanced effect and speed
- DNS query encrypted with HTTPS, which delivers the best effect but is slightly slow
http://43.132.55.55/d?dn=[encrypted domain string]&id=[authorization ID]&ttl=1
. For the request format, see AES/DES Encryption/Decryption.https://43.132.55.56/d?dn=[domain]&token=[HTTPS Token]&ttl=1
. For the request format, see Querying with HTTP Request Methods.HTTPDNS supports batch querying domains. You can enter multiple domains separated by commas. The query results will be separated by \n
. For example, you can query cloud.tencent.com,www.qq.com,www.dnspod.cn
at the same time.
Limits:
8 * 1024
bytes.Change the client DNS to HTTPDNS. Note that you need to retain the local DNS as a backup during connection. For more information, see Best Practice of API Connection.
You can connect to HTTPDNS with the SDK. Tencent Cloud's proprietary HTTPDNS SDKs are highly customizable and can be directly embedded in applications. With mature and stable features, they have been widely used on Tencent's various types of game clients.
Note:
dnsId
in the SDK parameters is the authorization ID.dnsKey
in the SDK parameters is the AES/DES encryption key (i.e., key for the authorization ID), which can be selected based on your encryption method.token
in the SDK parameters is the HTTPS token.appkey
in the SDK parameters is theAppID
. If you need to get theAppID
information, see SDK Activation Process.
For more information, see the following documents:
Was this page helpful?