• Domain Name Service

dns
  1. Help Center
  2. Domain Name Service
  3. User Guide
  4. Getting Started
  5. Configuring a Private Zone

Configuring a Private Zone

Scenarios

To use the DNS service to manage domain names in VPCs, you need to configure private zones on the DNS console.

Prerequisites

A VPC has been created.

For details, see the Virtual Private Cloud User Guide.

Configuration Process

Figure 1 Process to configure a private zone

You need to perform operations in Figure 1 in different places:

  • "Create a VPC" and "Create a VPC subnet configured with private DNS servers" are performed on the VPC console.
  • "Create a private zone associated with the VPC" and "Create record sets" are performed on the DNS console.

Procedure

Creating a private zone

  1. Log in to the management console.
  2. In the Network category, click Domain Name Service.

    The DNS console is displayed.

  3. In the navigation pane, choose Private Zones.

    The Private Zones page is displayed.

  4. Click on the upper left and select the desired region and project.
  5. Click Create Private Zone.
    Figure 2 Create Private Zone
  6. Configure the parameters according to Table 1.
    Table 1 Parameters required for creating a private zone

    Parameter

    Description

    Example Value

    Name

    Private domain name

    You can customize any correctly formatted top-level domain names.

    example.com

    VPC

    VPC to be associated with the private zone

    -

    Email

    (Optional) Email address of the administrator managing the private zone

    It is recommended that you set the email address to HOSTMASTER@Domain name.

    For more details about the email address, see Why Is the Email Address Format Changed in the SOA Record?

    HOSTMASTER@example.com

    Tag

    (Optional) Identifier of a resource. Each tag contains a key and a value. You can add 10 tags at most to a zone.

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

    example_key1

    example_value1

    Description

    (Optional) Description of the domain name, which cannot exceed 255 characters

    This is a private zone.

    Table 2 Tag key and value requirements

    Parameter

    Requirement

    Example Value

    Key

    • Cannot be left blank.
    • Must be unique for each resource.
    • Consists of at most 36 characters.
    • Contains only letters, digits, hyphens (-), and underscores (_).

    example_key1

    Value

    • Cannot be left blank.
    • Consists of at most 43 characters.
    • Contains only letters, digits, hyphens (-), and underscores (_).

    example_value1

  7. Click OK.

    You can query information about the private zone you created on the Private Zones page.

    NOTE:

    Click the zone name to query detailed zone information. The system has created record sets of the SOA type and NS type in the zone.

    • The SOA record set determines the DNS server that is the authoritative information source for a particular domain name.
    • The NS record set defines authoritative DNS servers for a zone.

Adding a record set of the A type

  1. In the zone list on the Private Zones page, click the name of the private zone you created.

    The record set page is displayed.

  2. Click Add Record Set.

    The Add Record Set box is displayed.

    Figure 3 Add Record Set
  3. Configure the parameters according to Table 3.
    Table 3 Parameters required for adding a record set of the A type

    Parameter

    Description

    Example Value

    Name

    Domain name (You do not need to manually add the suffix.)

    The default value is the zone name.

    abc

    Type

    Type of the record set

    A – Map domains to IPv4 addresses

    TTL (s)

    Caching period of the record set (in seconds)

    The default value is 300s, that is, 5 min.

    Value

    IPv4 addresses mapped to the domain name

    Every two IPv4 addresses are separated using a line break.

    192.168.12.2

    192.168.12.3

    Tag

    (Optional) Identifier of a resource. Each tag contains a key and a value. You can add 10 tags at most to a record set.

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

    example_key1

    example_value1

    Description

    (Optional) Description of the domain name

    -

  4. Click OK.

Changing DNS servers for a VPC subnet

To resolve private domain names in a VPC, you must change DNS servers used in the VPC subnets to the private DNS servers provided by the DNS service.

After you add a private zone, the DNS server addresses are displayed on the record set page.

You can perform the following operations to query the DNS server addresses:

  1. Log in to the management console.
  2. In the Network category, click Domain Name Service.

    The DNS console is displayed.

  3. In the navigation pane, choose Private Zones.

    The Private Zones page is displayed.

  4. Click on the upper left and select the desired region and project.
  5. In the private zone list, click the name of the zone.
  6. Query the DNS server addresses for VPC subnets on top of the private zone list.