Help Center/ Live/ Cloud Live/ Domain Name Management/ Configuring CNAME Records
Updated on 2024-12-06 GMT+08:00

Configuring CNAME Records

After a domain name is added, a CNAME record is automatically assigned to the domain name. You need to configure the CNAME record at your domain names' DNS provider. Acceleration is enabled once the configuration takes effect.

Notes

  • If the domain name you added is on Huawei Cloud, configure the CNAME record following the Procedure. If the domain name you added is not on Huawei Cloud, configure the CNAME record following the guidance provided by your domain names' DNS provider.
  • Configure CNAME records for the ingest domain name and streaming domain name separately.

Prerequisites

The ingest domain name and streaming domain name have been added and associated.

Procedure

The following uses a streaming domain name as an example. The procedure for configuring the CNAME record for an ingest domain name is the same.

  1. Obtain the CNAME record.

    1. Log in to the Live console.
    2. In the navigation pane on the left, choose Domains.
    3. Obtain the corresponding CNAME record in the CNAME column.
      Figure 1 Obtaining the CNAME record

  2. Log in to the Domain Name Service (DNS) console.
  3. In the navigation pane on the left, choose Public Zones.
  4. Click the target domain name in the Domain Name column, as shown in Figure 2.

    Figure 2 Domain name list

  5. Click Add Record Set in the upper right corner.

    Figure 3 Adding a record set
    Configure the parameters by referring to Table 1.
    Table 1 Parameters

    Parameter

    Description

    Type

    Type of the record set.

    Select CNAME – Map one domain to another here.

    Name

    Enter the second-level domain name. You do not need to enter the suffix.

    For example, if the streaming domain name is play-test.example.com, enter play-test.

    Line

    Used when the DNS server is resolving a domain name. It returns the IP address of the server according to the visitor source. For details, see Resolution Lines.

    This parameter is available only for public domain names.

    Select Default.

    TTL (s)

    Cache duration of the record set on a local DNS server, in seconds.

    The smaller the value is, the quicker the record takes effective.

    The default value is 300 seconds. You can retain the default value.

    Value

    Domain name to be pointed to, that is, the CNAME record obtained in step 1 of this section.

    For example, if the streaming domain name is play-test.example.com, enter play-test.example.com.c.cdnhwc3.com.

    Alias

    Whether to associate the record set with a cloud resource.

    • Enabled: The record set will be associated with a cloud resource.
    • Disabled: The record set will not be associated with a cloud resource.

    Toggle off the switch, that is, disable this function.

    Weight

    (Optional) Weight of a record set. The value ranges from 0 to 1000 and defaults to 1.

    This parameter is available only for public domain names.

    If a resolution line in a zone contains multiple record sets of the same type, you can configure weighted routing for each record set.

    Set this parameter to 1.

    Tag

    (Optional) Identifier of a record set. Each tag contains a key and a value. You can add up to 10 tags to a record set. For details about how to name a key and a value, see Adding a CNAME Record Set.

    Examples:

    • example_key1
    • example_value1

    Description

    (Optional) Describes a domain name.

    The description can contain a maximum of 255 characters.

  6. Click OK.

    The record set you added is displayed in the list. If the status of the record set is Normal, the record set has been added.

  7. Perform 1 to 6 to configure the CNAME record for the ingest domain name.

Checking Whether the CNAME Record Has Taken Effect

Open the command line interface that comes with Windows and run the following command:

nslookup -qt=cname Acceleration domain name
If the CNAME record is displayed, the CNAME record has taken effect. A typical command output is shown in Figure 4.
Figure 4 Checking whether the CNAME record has taken effect