All Products
Search
Document Center

AddRecord

Last Updated: Sep 17, 2020

Alibaba Cloud DNS supports the following types of DNS records:

  • A record
  • CNAME record
  • MX record
  • AAAA record
  • TXT record
  • NS record
  • SRV record
  • CAA record
  • URL record
  • PTR record

    Add an A record

Scenarios

You can add an A record to point a domain name to an IP address.

Procedure

1 . Log on to the Alibaba Cloud DNS console

2 . In the left-side navigation pane, click Manage DNS. On the Domains tab, click a domain name to open the DNS Settings page.

添加域名解析-1

3 . On the DNS Settings page, click Add Record.

添加域名解析-2

4 . In the Add Record dialog box, configure the following parameters:

  • Type: Select A.

  • Host: In most cases, this parameter indicates the prefix of the subdomain. If the subdomain is www.dns-example.com, you can enter www. If the subdomain is dns-example.com, you can enter @.

  • ISP Line: Select Default. You must specify an ISP line. Otherwise, your domain name may become inaccessible to some users.

  • Value: Enter an IPv4 address.

  • TTL: Enter a cache time. The smaller the cache time, the faster the record takes effect. The default value is 10 minutes.

添加域名解析-3.jpg


Add a CNAME record

Scenarios

A CNAME record provides an alias for a domain. You can add a CNAME record to point a domain name to another domain name that is mapped to an IP address. CNAME records apply to scenarios such as CDN, enterprise mailbox, and Global Traffic Manager.

Procedure

  • Type: Select CNAME.

  • Host: In most cases, this parameter indicates the prefix of the subdomain. If the subdomain is www.dns-example.com, you can enter www. If the subdomain is dns-example.com, you can enter @.

  • ISP Line: Select Default. You must specify an ISP line. Otherwise, your domain name may become inaccessible to some users.

  • Value: Enter the domain name for which you want to add a CNAME record.

  • TTL: Enter a cache time. The smaller the cache time, the faster the record takes effect. The default value is 10 minutes.

添加域名解析-4

Add an MX record

Scenarios

When configuring a mailbox, you must add a mail exchanger record (MX record) to ensure that your mailbox can receive emails. An MX record specifies which mail server receives emails based on the address suffix of the recipient. For example, if someone sends an email to vincen@example.com, the system will use the MX record of example.com for DNS resolution. The system forwards the email to the mail server that corresponds to the resolved address based on the priority of the MX record.

Procedure

Taking Alibaba Mail as an example, you need to configure the following parameters when adding an MX record:

  • Type: Select MX.

  • Host: In most cases, this parameter indicates the prefix of the subdomain. If the subdomain is xxx@dns-example.com, you can enter @. If the subdomain is xxx@mail.dns-example.com, you can enter mail.

  • ISP Line: Select Default. You must specify an ISP line. Otherwise, your email address may become inaccessible to some users.

  • Value: Contact the email registrar to obtain the MX record value. The MX record value can be a domain name or an IP address. For example, the MX record value for Alibaba Mail is mx1.qiye.aliyun.com.

  • MX Priority: Contact the email registrar to obtain the MX priority. A smaller value indicates a higher priority. Two MX records are added as shown in the following figures. The system will attempt to forward the email to mx1.qiye.aliyun.com with MX priority 5. If the attempt fails, the system will forward the email to mx2.qiye.aliyun.com with MX priority 10.

  • TTL: Enter a cache time. The smaller the cache time, the faster the record takes effect. The default value is 10 minutes.

添加域名解析-5
添加域名解析-6.jpg

Notes:The preceding example only shows how to add MX records. To create a mailbox, you must also add the CNAME and TXT records. For more information about which DNS records require to be added, contact your email registrar. If you are using Alibaba Mail, see [Configure DNS records for your mailbox]Configure DNS records for your mailbox
.

Add an AAAA record

Scenarios

You can add an AAAA record to the DNS records of your website domain. This ensures that visitors can access the website through IPv6 addresses.

Procedure

  • Type: Select AAAA

  • Host: In most cases, this parameter indicates the prefix of the subdomain. If the subdomain is www.dns-example.com, you can enter www. If the subdomain is dns-example.com, you can enter @.

  • ISP Line: Select Default. You must specify an ISP line. Otherwise, your website may become inaccessible to some users.

  • Value: Enter an IPv6 address.

  • TTL: Enter a cache time. The smaller the cache time, the faster the record takes effect. The default value is 10 minutes.

添加域名解析-7

Add a TXT record

Scenarios

You can add a TXT record to the DNS records of your domain to identify and describe the domain. In most cases, a TXT record is used as a Sender Policy Framework (SPF) record to prevent spam.

Procedure

  • Type: Select TXT

  • Host: In most cases, this parameter indicates the prefix of the subdomain. If the subdomain is www.dns-example.com, you can enter www. If the subdomain is dns-example.com, you can enter @.

  • ISP Line: Select Default. You must specify an ISP line. Otherwise, your domain name may become inaccessible to some users.

  • Value: In most cases, a TXT record is used as an SPF record to prevent spam. For example, a typical TXT record in the SPF format is v=spf1 a mx ~all. Only IP addresses in the A records and MX records of this domain name are allowed to use this domain name to send emails.

  • TTL: Enter a cache time. The smaller the cache time, the faster the record takes effect. The default value is 10 minutes.

添加域名解析-8

Add an NS record

Scenarios

If you want to delegate a subdomain to a different DNS provider, you can add an NS record to the DNS records of the subdomain.

Procedure

For example, Alibaba Cloud DNS is responsible for the DNS resolution of dns-example.com. If you want to delegate the subdomain www.dns-example.com from Alibaba Cloud DNS to Tencent Cloud DNS, you can configure the following parameters to add an NS record:

  • Type: Select NS.

  • Host: In most cases, this parameter indicates the prefix of the subdomain. If the subdomain is www.dns-example.com, you can enter www. This configuration ensures that the DNS resolution of www.dns-example.com will be delegated to Tencent Cloud DNS.

  • ISP Line: Select Default. You must specify an ISP line. Otherwise, your domain name may become inaccessible to some users.

  • Value: Enter the domain name of the DNS server to which you want to delegate. For example, the domain name of the DNS server that is provided by Tencent Cloud DNS is f1g1ns1.dnspod.net.

  • TTL: Enter a cache time. The smaller the cache time, the faster the record takes effect. The default value is 10 minutes.

添加域名解析-9

Add an SRV record

Scenarios

An SRV record is used to identify a server that uses a specific service. SRV records are commonly used in directory management for Microsoft systems.

Procedure

  • Type: Select SRV.

  • Host: Enter a hostname in the format of _service name. _protocol type.

    Example: _sip._tcp

  • ISP Line: Select Default. You must specify an ISP line. Otherwise, your domain name may become inaccessible to some users.

  • Value: Enter the record value in the format of . Separate each item with spaces.

    Example: 0 5 5060 sipserver.example.com

  • Value: Enter a cache time. The smaller the cache time, the faster the record takes effect. The default value is 600 seconds .

添加域名解析-10

Add a CAA record

You can add CAA records only if you are using the paid edition of Alibaba Cloud DNS.

Scenarios

You can add a Certification Authority Authorization (CAA) record to the DNS records of a domain to specify one or more certification authorities (CAs) that are authorized to issue certificates for the domain. An unauthorized third-party CA will be rejected if it attempts to obtain an SSL or TLS certificate for the domain.

By adding a CAA record to the DNS records of your website domain, you can specify one or more CAs that are authorized to issue certificates for the domain. This prevents HTTPS certificates issued by unauthorized CAs and improve the security of the website.

CAA record format

The format of a CAA record is:[]<]> [tag] [value]A CAA record consists of a flag byte ([][) and a tag-value pair (][]-<[><]>) that is referred to as a property. You can add multiple CAA fields to the DNS record of a domain name.

Field Description
flag Unsigned integers (currently only 0 and 128 are supported), used to mark certification bodies. We recommend that you specify this field as 0. If the certification authority does not recognize the flag information, the flag information will be ignored.
tag The value of the certificate property tag can be issue, issuewild, and iodef.
  • issue: The CA authorizes a single certificate authority to issue all types of certificates.
  • issuewild: The CA authorizes a single certificate authority to issue a wildcard certificate for the hostname.
  • iodef: The CA sends the URL of an invalid certificate request to an email address.
value The domain name of the CA or the email address that is used for notifying users of violations.

Procedure

Add the following two CAA records.

Hostname Record value
@ 0 issue “symantec.com”
@ 0 iodef “mailto:admin@dns-example.com”

添加域名解析-11


添加域名解析-12

Explicit or implicit URL forwarding

Scenarios

If you want to point a domain name to a website, you must add a URL forwarding record.

Prerequisites

You have completed the ICP filing for the domain name before URL forwarding.

Configuration method

Example: Redirect from http://dns-example.com to http://www.aliyun.com:80/.

1 . Implicit URL forwarding

The iFrame technology is used instead of the redirection technology.

Implicit URL forwarding

Effect

After you enter http://dns-example.com in the address bar of your browser and press Enter, the website that corresponds to the address http://www.aliyun.com:80/ appears but the displayed address is still http://dns-example.com.

2 . Explicit URL forwarding

Permanent redirect (301 redirect) and temporary redirect (302 redirect) are supported.

Explicit URL forwarding

Effect

After you enter http://dnswork.top in the address bar of your browser and press Enter, the website that corresponds to the address http://www.aliyun.com:80/ appears and the displayed address is also http://www.aliyun.com:80/.

Rules of URL forwarding

Before you add a URL forwarding record, you must complete the ICP filing for the domain name before URL forwarding and make sure that the service provider recorded in the ICP filing is Alibaba Cloud.

  • The Value parameter cannot be set to an IP address.
  • URL forwarding does not support wildcard domain names.
  • Chinese domain names cannot be used as the destination domain name.
  • Domain names used before URL forwarding support HTTP and does not support HTTPS. The destination address used after URL forwarding supports both HTTP and HTTPS.
  • URL forwarding is a special feature of Alibaba Cloud DNS. Alibaba Cloud DNS does not provide the attack protection service for this feature. URL forwarding cannot be used if a blackhole attack occurs. In such cases, you must change the host records that you want to forward to the A or CNAME type.


PTR record

Reverse DNS lookup requires that IP addresses be mapped to domain names. To achieve this feature, you must contact your data center or host service provider.

If your servers are provided by Alibaba Cloud, you can submit a ticket . Alibaba Cloud server aftersales support will help you configure reverse DNS lookup.