Help Center/ Domain Name Service/ FAQs/ Public Zones/ How Do I Add Record Sets to Subdomains?
Updated on 2024-08-12 GMT+08:00

How Do I Add Record Sets to Subdomains?

To resolve a subdomain, you need to enter a prefix for the second-level domain name when you configure a record set for it.

The following uses example.com to describe how to add an A record set to its subdomain 123.example.com to map it to an IPv4 address 192.168.1.2.

To translate 123.example.com to 192.168.1.2, you need to set the Name field to 123 when you add the A record set to example.com. The number of subdomains under a second-level domain name depends on the number of record sets that can be configured for the second-level domain name.

By default, each account can add up to 500 record sets. You can view the number of record sets that can be added above the record set list.

If the quota does not meet your requirements, contact customer service for a higher quota.

Procedure

  1. Go to the Public Zones page.
  2. Click the domain name example.com.
  3. Click Add Record Set.

    The Add Record Set dialog box is displayed.

  4. Configure the parameters based on Table 1.
    Table 1 Parameters for adding an A record set

    Parameter

    Description

    Example Value

    Name

    Prefix of the second-level domain name. (You do not need to enter the second-level domain name.)

    123

    Type

    Type of the record set.

    A – Map domains to IPv4 addresses

    Line

    Resolution line.

    The DNS server will return the IP address of the specified line based on the source of visitors.

    • Default: returns the default resolution result irrespective of where the visitors come from.
    • ISP: returns the resolution result based on visitors' carrier networks. For details, see Configuring ISP Lines.
    • Region: returns the resolution result based on visitors' geographical locations. For details, see Configuring Region Lines.

    Default

    TTL (s)

    Cache duration of the record set, in seconds.

    300

    Value

    IPv4 addresses mapped to the domain name.

    Enter each IPv4 address on a separate line.

    10.18x.xxx.xxx

    Weight

    (Optional) Weight for the record set.

    The value ranges from 0 to 1000, and the default is 1.

    This parameter is only designated for public domain names.

    If a resolution line in a zone contains multiple record sets of the same type, you can set different weights to each record set.

    1

    Tag

    Identifier of the record set. Each tag contains a key and a value. You can add up to 20 tags to a record set.

    For details about tag key and value requirements, see Table 2.

    example_key1

    example_value1

    Description

    (Optional) Supplementary information about the record set.

    -

    Table 2 Tag key and value requirements

    Parameter

    Requirements

    Example Value

    Key

    • Cannot be left blank.
    • Must be unique for each resource.
    • Can contain no more than 36 characters.
    • Cannot start or end with a space nor contain special characters =*<>\,|/

    example_key1

    Value

    • Cannot be left blank.
    • Can contain no more than 43 characters.
    • Cannot start or end with a space nor contain special characters =*<>\,|/

    example_value1

  5. Click OK.

    The added record set is in the Normal state.