Adding Record Sets for a Private Zone
Scenarios
After creating a private zone for your domain name, you need to add record sets for your zone. DNS supports multiple types of record sets that apply to different service scenarios.
Record Set Type |
Where to Use |
---|---|
An A record set maps domain names to IPv4 addresses of website servers. If you want to make your website accessible via a domain name, you need to add an A record set to map the domain name to the IPv4 address of your web server. |
|
A CNAME record set is used for scenarios like website resolution, CDN, enterprise mailbox, enterprise portal, web application firewall, object storage, and live video streaming. It maps one domain name to another domain name or multiple domain names to one domain name. |
|
An MX record set maps domain names to email servers. It is used for routing traffic to a mailbox. It records the email server's priority and domain name. |
|
An AAAA record set maps domain names to IPv6 addresses of website servers. |
|
A TXT record set is used as a digital authentication certificate and for SPF (anti-spam) and domain name retrieval. It stores text-based information associated with a domain name. |
|
An SRV record set records the services provided by servers. It is commonly used for directory management at Microsoft. |
|
NS |
An NS record set is created by default. It specifies authoritative DNS servers of domain names. This type of record set is created by default and cannot be added manually. |
SOA |
An SOA record set provides basic information about domain names and details about authoritative servers. This type of record set is created by default and cannot be added manually. |
A PTR record set maps an IP address back to a domain name, essentially performing a reverse DNS lookup. |
This section describes how to add a record set for a zone and the service scenarios and configuration rules of record sets of different types.
Constraints
- Only ECSs in the VPC associated with the private zone can access the private zone.
- To make the private zone and its record sets take effect in a VPC, ensure that the VPC subnets use the private DNS server addresses provided by the DNS service.
- On the Record Sets tab of the private zone, you can view the private DNS server addresses in the current region. The private DNS server address varies depending on the region.
- On the VPC subnet details page, you can view the DNS server addresses used by ECSs in the Gateway and DNS Information area.
Ensure that the DNS server address of the VPC subnet associated with the ECS is the same as the private DNS server address of Huawei Cloud.
- On the Record Sets tab of the private zone, you can view the private DNS server addresses in the current region. The private DNS server address varies depending on the region.
Adding a Record Set
An A record maps a domain name to the private IP address of an internal server or device.
Constraints
An A record cannot coexist with a CNAME record for the same name.
For details about the conflict rules and handling measures, see Rules for Handling Record Set Conflicts.
Procedure
- Go to the Private Zones page.
- Locate the target zone and click Manage Record Sets in the Operation column.
- Click Add Record Set above the record set list.
- On the Add Record Set page, set record set parameters as instructed.
Table 1 Record set parameters Parameter
Description
Example
Type
Record set type.
Select a record set type based on service requirements.
For details, see Table 1.
A – Map domains to IPv4 addresses
Name
Prefix of the domain name to be resolved.
This value is left empty by default.
For example, if the domain name is example.com, the value of the Name can be as follows:
- www: The domain name is www.example.com and usually used for a website.
- Left blank: The domain name is example.com and usually used for a website.
To use an at sign (@) as the domain name prefix, just leave this parameter blank.
- abc: The domain name is abc.example.com, a subdomain of example.com.
- mail: The domain name is mail.example.com and usually used for email servers.
- *: The domain name is *.example.com. It covers all subdomains of example.com.
Leave it blank.
TTL (s)
How long a local DNS server caches a DNS record. It is measured in seconds.
Default value: 300
Value range: 1 to 2147483647
If your service address changes frequently, set TTL to a smaller value. Otherwise, set TTL to a larger value.
300
Value
Enter the IPv4 addresses mapped to the domain name.
You can enter a maximum of 50 unique addresses, each on a separate line.
192.168.xx.2
192.168.xx.3
Tag
Identifier of the record set. Each tag contains a key and a value.
You can add up to 20 tags for a record set.
Tag key. The key:
- Cannot be left blank.
- Must be unique for each resource.
- Contains a maximum of 36 characters.
- Cannot start or end with a space nor contain special characters =*<>\,|/
Tag value. The value:
- Cannot be left blank.
- Can contain a maximum of 43 characters.
- Cannot start or end with a space nor contain special characters =*<>\,|/
NOTE:If your organization has configured tag policies for the DNS service, you need to add tags to your record sets based on the tag policies. If you add a tag that does not comply with the tag policies, record sets may fail to be created. Contact the administrator to learn more about tag policies.
example_key1
example_value1
Description
Supplementary information about the record set.
The description can contain a maximum of 255 characters.
Record set of the private zone
- Click OK.
A CNAME record maps a domain name to another. CNAME records can simplify private zone management. For example, if www.internal is mapped to webserver.internal, you only need to modify the A record when the IP address of webserver.internal changes.
Constraints
A CNAME record cannot coexist with other types of records for the same name.
For details about the conflict rules and handling measures, see Rules for Handling Record Set Conflicts.
Procedure
- Go to the Private Zones page.
- Locate the target zone and click Manage Record Sets in the Operation column.
- Click Add Record Set above the record set list.
- On the Add Record Set page, set record set parameters as instructed.
Table 2 Record set parameters Parameter
Description
Example
Type
Record set type.
Select a record set type based on service requirements.
For details, see Table 1.
CNAME – Map one domain to another
Name
Prefix of the domain name to be resolved.
This value is left empty by default.
For example, if the domain name is example.com, the value of the Name can be as follows:
- www: The domain name is www.example.com and usually used for a website.
- Left blank: The domain name is example.com and usually used for a website.
To use an at sign (@) as the domain name prefix, just leave this parameter blank.
- abc: The domain name is abc.example.com, a subdomain of example.com.
- mail: The domain name is mail.example.com and usually used for email servers.
- *: The domain name is *.example.com. It covers all subdomains of example.com.
Leave it blank.
TTL (s)
How long a local DNS server caches a DNS record. It is measured in seconds.
Default value: 300
Value range: 1 to 2147483647
If your service address changes frequently, set TTL to a smaller value. Otherwise, set TTL to a larger value.
300
Value
Enter the domain name that you want to point to.
webserver.example.com
Tag
Identifier of the record set. Each tag contains a key and a value.
You can add up to 20 tags for a record set.
Tag key. The key:
- Cannot be left blank.
- Must be unique for each resource.
- Contains a maximum of 36 characters.
- Cannot start or end with a space nor contain special characters =*<>\,|/
Tag value. The value:
- Cannot be left blank.
- Can contain a maximum of 43 characters.
- Cannot start or end with a space nor contain special characters =*<>\,|/
NOTE:If your organization has configured tag policies for the DNS service, you need to add tags to your record sets based on the tag policies. If you add a tag that does not comply with the tag policies, record sets may fail to be created. Contact the administrator to learn more about tag policies.
example_key1
example_value1
Description
Supplementary information about the record set.
The description can contain a maximum of 255 characters.
Record set of the private zone
- Click OK.
An MX record specifies the internal mail server in private domain name resolution.
Constraints
An MX record cannot coexist with a CNAME record for the same name.
For details about the conflict rules and handling measures, see Rules for Handling Record Set Conflicts.
Procedure
- Go to the Private Zones page.
- Locate the target zone and click Manage Record Sets in the Operation column.
- Click Add Record Set above the record set list.
- On the Add Record Set page, set record set parameters as instructed.
Table 3 Record set parameters Parameter
Description
Example
Type
Record set type.
Select a record set type based on service requirements.
For details, see Table 1.
MX – Map domains to email servers
Name
Prefix of the domain name to be resolved.
This value is left empty by default.
For example, if the domain name is example.com, the value of the Name can be as follows:
- www: The domain name is www.example.com and usually used for a website.
- Left blank: The domain name is example.com and usually used for a website.
To use an at sign (@) as the domain name prefix, just leave this parameter blank.
- abc: The domain name is abc.example.com, a subdomain of example.com.
- mail: The domain name is mail.example.com and usually used for email servers.
- *: The domain name is *.example.com. It covers all subdomains of example.com.
Leave it blank.
TTL (s)
How long a local DNS server caches a DNS record. It is measured in seconds.
Default value: 300
Value range: 1 to 2147483647
If your service address changes frequently, set TTL to a smaller value. Otherwise, set TTL to a larger value.
300
Value
Enter email server addresses.
You can enter a maximum of 50 unique addresses, each on a separate line.
The format is [priority][mail-server-host-name].
Configuration rules:- priority: priority for an email server to receive emails. A smaller value indicates a higher priority.
- mail server host name: domain name provided by the email service provider
10 mailserver.example.com.
20 mailserver2.example.com.
Tag
Identifier of the record set. Each tag contains a key and a value.
You can add up to 20 tags for a record set.
Tag key. The key:
- Cannot be left blank.
- Must be unique for each resource.
- Contains a maximum of 36 characters.
- Cannot start or end with a space nor contain special characters =*<>\,|/
Tag value. The value:
- Cannot be left blank.
- Can contain a maximum of 43 characters.
- Cannot start or end with a space nor contain special characters =*<>\,|/
NOTE:If your organization has configured tag policies for the DNS service, you need to add tags to your record sets based on the tag policies. If you add a tag that does not comply with the tag policies, record sets may fail to be created. Contact the administrator to learn more about tag policies.
example_key1
example_value1
Description
Supplementary information about the record set.
The description can contain a maximum of 255 characters.
Record set of the private zone
- Click OK.
If the private network supports IPv6 addresses, you can add an AAAA record to map the domain name to an IPv6 address.
Constraints
An AAAA record cannot coexist with a CNAME record for the same name.
For details about the conflict rules and handling measures, see Rules for Handling Record Set Conflicts.
Procedure
- Go to the Private Zones page.
- Locate the target zone and click Manage Record Sets in the Operation column.
- Click Add Record Set above the record set list.
- On the Add Record Set page, set record set parameters as instructed.
Table 4 Record set parameters Parameter
Description
Example
Type
Record set type.
Select a record set type based on service requirements.
For details, see Table 1.
AAAA – Map domain names to IPv6 addresses
Name
Prefix of the domain name to be resolved.
This value is left empty by default.
For example, if the domain name is example.com, the value of the Name can be as follows:
- www: The domain name is www.example.com and usually used for a website.
- Left blank: The domain name is example.com and usually used for a website.
To use an at sign (@) as the domain name prefix, just leave this parameter blank.
- abc: The domain name is abc.example.com, a subdomain of example.com.
- mail: The domain name is mail.example.com and usually used for email servers.
- *: The domain name is *.example.com. It covers all subdomains of example.com.
Leave it blank.
TTL (s)
How long a local DNS server caches a DNS record. It is measured in seconds.
Default value: 300
Value range: 1 to 2147483647
If your service address changes frequently, set TTL to a smaller value. Otherwise, set TTL to a larger value.
300
Value
Enter IPv6 addresses mapped to the domain name.
You can enter up to 50 unique addresses, each on a separate line.
ff03:0db8:85a3:0:0:8a2e:0370:7334
Tag
Identifier of the record set. Each tag contains a key and a value.
You can add up to 20 tags for a record set.
Tag key. The key:
- Cannot be left blank.
- Must be unique for each resource.
- Contains a maximum of 36 characters.
- Cannot start or end with a space nor contain special characters =*<>\,|/
Tag value. The value:
- Cannot be left blank.
- Can contain a maximum of 43 characters.
- Cannot start or end with a space nor contain special characters =*<>\,|/
NOTE:If your organization has configured tag policies for the DNS service, you need to add tags to your record sets based on the tag policies. If you add a tag that does not comply with the tag policies, record sets may fail to be created. Contact the administrator to learn more about tag policies.
example_key1
example_value1
Description
Supplementary information about the record set.
The description can contain a maximum of 255 characters.
Record set of the private zone
- Click OK.
A TXT record stores Sender Policy Framework (SPF) records to prevent spam.
Constraints
A TXT record cannot coexist with a CNAME record for the same name.
For details about the conflict rules and handling measures, see Rules for Handling Record Set Conflicts.
Procedure
- Go to the Private Zones page.
- Locate the target zone and click Manage Record Sets in the Operation column.
- Click Add Record Set above the record set list.
- On the Add Record Set page, set record set parameters as instructed.
Table 5 Record set parameters Parameter
Description
Example
Type
Record set type.
Select a record set type based on service requirements.
For details, see Table 1.
TXT – Specify text records
Name
Prefix of the domain name to be resolved.
This value is left empty by default.
For example, if the domain name is example.com, the value of the Name can be as follows:
- www: The domain name is www.example.com and usually used for a website.
- Left blank: The domain name is example.com and usually used for a website.
To use an at sign (@) as the domain name prefix, just leave this parameter blank.
- abc: The domain name is abc.example.com, a subdomain of example.com.
- mail: The domain name is mail.example.com and usually used for email servers.
- *: The domain name is *.example.com. It covers all subdomains of example.com.
Leave it blank.
TTL (s)
How long a local DNS server caches a DNS record. It is measured in seconds.
Default value: 300
Value range: 1 to 2147483647
If your service address changes frequently, set TTL to a smaller value. Otherwise, set TTL to a larger value.
300
Value
Enter text content as required.
Configuration rules:
- Text record values must be enclosed in double quotation marks.
- One or more text record values are supported, each on a separate line.
- A single text record value can contain multiple character strings, each of which is double quoted and separated from others using a space.
One character string cannot exceed 255 characters.
A value must not exceed 4,096 characters.
- The value cannot be left blank.
- The text cannot contain a backslash (\).
Tag
Identifier of the record set. Each tag contains a key and a value.
You can add up to 20 tags for a record set.
Tag key. The key:
- Cannot be left blank.
- Must be unique for each resource.
- Contains a maximum of 36 characters.
- Cannot start or end with a space nor contain special characters =*<>\,|/
Tag value. The value:
- Cannot be left blank.
- Can contain a maximum of 43 characters.
- Cannot start or end with a space nor contain special characters =*<>\,|/
NOTE:If your organization has configured tag policies for the DNS service, you need to add tags to your record sets based on the tag policies. If you add a tag that does not comply with the tag policies, record sets may fail to be created. Contact the administrator to learn more about tag policies.
example_key1
example_value1
Description
Supplementary information about the record set.
The description can contain a maximum of 255 characters.
Record set of the private zone
- Click OK.
An SRV record specifies the servers that provide specific services.
Constraints
An SRV record cannot coexist with a CNAME record for the same name.
For details about the conflict rules and handling measures, see Rules for Handling Record Set Conflicts.
Procedure
- Go to the Private Zones page.
- Locate the target zone and click Manage Record Sets in the Operation column.
- Click Add Record Set above the record set list.
- On the Add Record Set page, set record set parameters as instructed.
Table 6 Record set parameters Parameter
Description
Example
Type
Record set type.
Select a record set type based on service requirements.
For details, see Table 1.
SRV – Record servers providing specific services
Name
Prefix of the domain name to be resolved.
This value is left empty by default.
For example, if the domain name is example.com, the value of the Name can be as follows:
- www: The domain name is www.example.com and usually used for a website.
- Left blank: The domain name is example.com and usually used for a website.
To use an at sign (@) as the domain name prefix, just leave this parameter blank.
- abc: The domain name is abc.example.com, a subdomain of example.com.
- mail: The domain name is mail.example.com and usually used for email servers.
- *: The domain name is *.example.com. It covers all subdomains of example.com.
Leave it blank.
TTL (s)
How long a local DNS server caches a DNS record. It is measured in seconds.
Default value: 300
Value range: 1 to 2147483647
If your service address changes frequently, set TTL to a smaller value. Otherwise, set TTL to a larger value.
300
Value
Enter the specific server addresses.
You can enter a maximum of 50 unique addresses, each on a separate line.
The value format is [priority] [weight] [port] [server host name].
Configuration rules:
- The priority, weight, and port number range from 0 to 65535.
- A smaller value indicates a higher priority.
- A larger value indicates a larger weight.
- The host name is the domain name of the target server.
NOTE:If the record set values have the same priority, requests to the domain name will be routed based on weights.
2 1 2355 servertest.example.com
Tag
Identifier of the record set. Each tag contains a key and a value.
You can add up to 20 tags for a record set.
Tag key. The key:
- Cannot be left blank.
- Must be unique for each resource.
- Contains a maximum of 36 characters.
- Cannot start or end with a space nor contain special characters =*<>\,|/
Tag value. The value:
- Cannot be left blank.
- Can contain a maximum of 43 characters.
- Cannot start or end with a space nor contain special characters =*<>\,|/
NOTE:If your organization has configured tag policies for the DNS service, you need to add tags to your record sets based on the tag policies. If you add a tag that does not comply with the tag policies, record sets may fail to be created. Contact the administrator to learn more about tag policies.
example_key1
example_value1
Description
Supplementary information about the record set.
The description can contain a maximum of 255 characters.
Record set of the private zone
- Click OK.
You can create PTR record sets to map private IP addresses to domain names.
Constraints
- PTR record sets can only be added to private zones whose domain name suffix is in-addr.arpa.
- A PTR record cannot coexist with a CNAME record for the same name.
For details about the conflict rules and handling measures, see Rules for Handling Record Set Conflicts.
Procedure
- Go to the Private Zones page.
- Locate the target zone and click Manage Record Sets in the Operation column.
- Click Add Record Set above the record set list.
- On the Add Record Set page, set record set parameters as instructed.
Table 7 Record set parameters Parameter
Description
Example
Type
Record set type.
Select a record set type based on service requirements.
For details, see Table 1.
PTR – Map IP addresses to domains
Name
Prefix of the domain name to be resolved.
This value is left empty by default.
For example, if the domain name is example.com, the value of the Name can be as follows:
- www: The domain name is www.example.com and usually used for a website.
- Left blank: The domain name is example.com and usually used for a website.
To use an at sign (@) as the domain name prefix, just leave this parameter blank.
- abc: The domain name is abc.example.com, a subdomain of example.com.
- mail: The domain name is mail.example.com and usually used for email servers.
- *: The domain name is *.example.com. It covers all subdomains of example.com.
Leave it blank.
TTL (s)
How long a local DNS server caches a DNS record. It is measured in seconds.
Default value: 300
Value range: 1 to 2147483647
If your service address changes frequently, set TTL to a smaller value. Otherwise, set TTL to a larger value.
300
Value
Enter the private domain name mapped to the private IP address. You can specify only one domain name.
PTR record sets can only be added to private zones whose domain name suffix is in-addr.arpa.
www.example.com
Tag
Identifier of the record set. Each tag contains a key and a value.
You can add up to 20 tags for a record set.
Tag key. The key:
- Cannot be left blank.
- Must be unique for each resource.
- Contains a maximum of 36 characters.
- Cannot start or end with a space nor contain special characters =*<>\,|/
Tag value. The value:
- Cannot be left blank.
- Can contain a maximum of 43 characters.
- Cannot start or end with a space nor contain special characters =*<>\,|/
NOTE:If your organization has configured tag policies for the DNS service, you need to add tags to your record sets based on the tag policies. If you add a tag that does not comply with the tag policies, record sets may fail to be created. Contact the administrator to learn more about tag policies.
example_key1
example_value1
Description
Supplementary information about the record set.
The description can contain a maximum of 255 characters.
Record set of the private zone
- Click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot