Share via


Add a Resource Record to a Zone

Applies To: Windows Server 2008

After you create a zone, typically you add additional resource records to it. The most common resource records to be added are the following:

  • Host (A) resource record for mapping a Domain Name System (DNS) domain name to an IP address that a computer uses.

  • Alias (CNAME) resource record for mapping an alias DNS domain name to another primary or canonical name.

  • Mail exchanger (MX) resource record for mapping a DNS domain name to the name of a computer that exchanges or forwards mail.

  • Pointer (PTR) resource record for mapping a reverse DNS domain name that is based on the IP address of a computer that points to the forward DNS domain name of that computer.

  • Service location (SRV) resource record for mapping a DNS domain name to a specified list of DNS host computers that offer a specific type of service, such as Active Directory domain controllers.

You can also add other resource records as needed. For more information, see Checklist: Use Resource Records.

Membership in the Administrators group, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at Local and Domain Default Groups (https://go.microsoft.com/fwlink/?LinkId=83477).

Adding a resource record to a zone

  • Using the Windows interface

  • Using a command line

To add a resource record to a zone using the Windows interface

  1. Open DNS Manager.

  2. In the console tree, right-click the applicable zone, and then click Other New Records.

  3. In the Select a resource record type list box, select the type of resource record that you want to add.

  4. Click Create Record.

  5. In New Resource Record, enter the information to complete the resource record.

  6. After you specify all the necessary information for the resource record, click OK to add the new record to the zone.

Additional considerations

  • To open DNS Manager, click Start, point to Administrative Tools, and then click DNS.

To add a resource record to a zone using a command line

  1. Open a command prompt.

  2. Type the following command, and then press ENTER:

    dnscmd <ServerName> /RecordAdd <ZoneName> <NodeName> [/Aging] [/OpenAcl] [Ttl] <RRType> <RRData>
    
Parameter Description

dnscmd

The command-line tool for managing DNS servers.

<ServerName>

Required. Specifies the DNS host name of the DNS server. You can also type the IP address of the DNS server. To specify the DNS server on the local computer, you can also type a period (.).

/RecordAdd

Required. Adds a new resource record.

<ZoneName>

Required. Specifies the fully qualified domain name (FQDN) of the zone.

<NodeName>

Required. Specifies the FQDN of the node in the DNS namespace. You can also type the node name relative to the ZoneName or @, which specifies the zone's root node.

/Aging

Specifies that this resource record is able to be aged and scavenged. If this command is used, this resource record is able to be aged and scavenged. If this command is not used, the resource record remains in the DNS database unless it is manually updated or removed.

/OpenAcl

Specifies that new records are open to modification by any user. Without this parameter, only administrators may modify the new record.

Ttl

Specifies the Time To Live (TTL) setting for the resource record.

<RRType> <RRData>

Required. Specifies the type of resource record to add, followed by the data to be contained in the resource record.

  • A: IPv4Address

  • AAAA: Ipv6Address

  • NS,CNAME,MB,MD,PTR,MF,MG,MR: HostName|DomainName

  • MX,RT,AFSDB: Preference ServerName

  • SRV: Priority Weight Port HostName

  • SOA: PrimSvr Admin Serial#\ Refresh Retry Expire MinTTL

  • TXT,X25,HINFO,ISDN: String [String]

  • MINFO,RP: MailboxName ErrMailboxName

  • WKS: Protocol IPAddress Service...

  • WINS: MapFlag LookupTimeout CacheTimeout IPAddress...

  • WINSR: MapFlag LookupTimeout CacheTimeout RstDomainName

<IPAddress>

Specifies a standard IP address, for example, 255.255.255.255.

<ipv6Address>

Specifies a standard IPv6 address, for example, 1:2:3:4:5:6:7:8.

<Protocol>

Specifies the transmission protocol: UDP or TCP.

<Service>

Specifies a standard service, for example, domain, smtp.

<HostName|<DomainName>

Specifies the FQDN of a resource record in the DNS namespace.

To view the complete syntax for this command, at a command prompt, type the following command, and then press ENTER:

dnscmd /RecordAdd /help

Additional considerations

  • To open an elevated Command Prompt window, click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.