DNS
Contents
    Loading
Documentation DNS CNAME Flattening

CNAME Flattening

Feature Overview

CNAME flattening is a proprietary feature developed by DNSPod. It solves the issue where the resolving time is increased due to the fact that the recursive server needs to send multiple requests to the authoritative server when multiple CNAME records are configured.
Suppose a.com, b.com, and c.com are all domains resolved by DNSPod:

Domain Name Record Type Value
www.a.com CNAME www.b.com
www.b.com CNAME www.c.com
www.c.com A 1.2.3.4

In general, the recursive server needs to send three requests to the authoritative server to get the IP address of www.a.com as shown below:

After CNAME flattening is enabled, the authoritative server will return the CNAME record and the final A record together to the recursive server, so the recursive server only needs to send one request instead of three requests to the authoritative server as shown below:

This greatly reduces the time spent on network communication in requests and responses and makes resolution faster, particularly when multiple CNAME records are configured.

Feature Enablement

  1. Log in to the DNSPod console and enter the My Domains page.
  2. Select the domain for which you need to enable CNAME flattening to enter the domain management page.
  3. Click the Domain Settings tab, select Feature Settings > CNAME Flattening, and click Enable as shown below:

Flattening Effect

Note:
This test is performed after the cache is cleared, and the change will take effect after the TTL expires.

  • Before CNAME flattening is enabled, the query time is 1021 msec:
    1
  • After CNAME flattening is enabled, the query time is 410 msec:
    2
    The resolving time is reduced by 59.84%.

Note

  • A domain for which to enable CNAME flattening must use the DNS service of Tencent Cloud DNS or DNSPod; otherwise, the feature cannot be enabled, or the flattening will fail, and even errors may occur.
  • For a domain for which CNAME flattening is already enabled, when the system detects that it does not use DNSPod's DNS service (for example, the domain has expired or switched to another DNS provider), it will automatically disable CNAME flattening, and when the system detects that the domain uses DNSPod again, it will automatically enable CNAME flattening again.
  • CNAME flattening does not need to be enabled for different subdomains under the same domain, as the system will automatically accelerate the resolution for them.
  • You should disable CNAME flattening before transferring your domain. If it has been transferred but the system hasn't detected its current status, you can disable CNAME flattening by yourself or by contacting technical support.
Last updated on 2021-01-27 11:11

DNSPod Technical Community

Sharing & discussions

Scan using WeChat

Official WeChat group

Join WeChat group to chat and feedback

Scan using WeChat