tencent cloud

Feedback

Connecting to HTTPDNS

Last updated: 2022-06-22 16:11:44
    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.

    1. Register an account

    First, you need to activate HTTPDNS in the HTTPDNS console as instructed in Activating HTTPDNS.

    2. Add a domain

    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.

    3. Get the configuration information

    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.

    4. Resolve the domain with the HTTPDNS API

    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

    Single query

    Batch query

    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:

    • Up to 8 domains are supported at a time, and the returned value will not exceed 8 * 1024 bytes.

    5. Modify the client

    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.

    6. Apply for use with SDK (optional)

    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 the AppID. If you need to get the AppID information, see SDK Activation Process.

    For more information, see the following documents:

    SDK for iOS >>

    SDK for Android >>

    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support