DNS. Types of DNS records

A CNAME record allows you to assign an alias to a host. This alias usually associates some function with the host, or simply shortens its name.

You can configure access to the mailbox authorization page at “mail.yourdomain.tld”, where “уourdomain.tld” is the name of the domain on which the mailboxes were created. To do this, you need to create a CNAME record according to the instructions below. The record should be created on those servers to which your domain is delegated.

If you have delegated your domain to Yandex servers, the required CNAME record will be configured automatically. You can view or edit its settings in the DNS editor of Mail for a domain.

    Open the DNS management page on the website of the company providing your DNS hosting services.

    Create a CNAME record with the following field values ​​(in different panels field names may differ):

    • Name - "mail".

      Some control panels require the entry name to be full name subdomain, for example "mail.yourdomain.tld".

      The value is “domain.mail.yandex.net.” . Please note that you do not need to change the server name (substitute your domain name instead of domain).

      The period at the end of the server name is required unless your control panel adds this period by default.

    Wait for the DNS changes to take effect. This process can take up to 72 hours.

Webmin does not support all record types that BIND knows. Only those that are more common are supported. Below we will describe the types of records that Webmin can work with. In addition, it will be given a brief description of each of these types.

Post types available in the direct zone:

Address (A)- address type of record. This type associates an IP address with a hostname. Any system to which you want to connect via HTTP, telnet or other protocol that has a hostname assigned to it must have an address record so that the hostname can be used to find the host's IP address. Remember, one hostname( hostname) may have several address records(records A type). This is often used to distribute the load of a website across multiple systems. In addition, you can create multiple address entries with different hostnames, but the same IP address, as if you were creating name-based) virtual servers Apache.

When creating or editing an address entry, the field Address(IP address) is intended to record the IP address that will be associated with the hostname. Field Update reverse??) , is responsible for automatic creation and changing the entry Reverse Address, typePTR) V Reverse zone) . See Adding and Editing Entries for details.

Name Server (NS)- record type defining the name of the server responsible for servicing the zone. Each zone must have at least one NS record and may also have additional NS records for subdomains of that zone. If you are setting up a secondary DNS server for a certain zone, then do not forget to check whether the NS record for this zone has been added to the main DNS server. In this case (if you are setting up an additional DNS server), the record name must be canonical for the zone, for example example.com (i.e. completely with the parent zone(s)).

When creating or editing a record of this type, the Name Server field is intended for entering the IP address or hostname, the DNS server responsible for servicing the zone. If you enter a hostname, then you also need an Address record (A-record) with an IP address for this hostname located in a certain zone on your DNS server.

Name Alias ​​(CNAME)- this type of record allows you to create aliases (aliases, links, bindings) to existing address (Address; type A) and reverse address (Reverse Address, type PTR) records. When a DNS client requests an IP address of this type (Name Alias), it receives the IP address specified in the record to which the binding is made. This can be useful if you want a certain host to be accessible under multiple names. Of course, this can be achieved by creating several address records, but the option with aliases is more convenient in that if a host’s IP address has changed, then there is no need to change anything in the aliases. Whereas, if you use many address records, you will have to make changes to each record associated with this certain server.

The form for creating and editing a Name Alias ​​record contains the Real Name field, intended for entering the canonical real name of the record to which the alias will point (for example, webserver.example.com).

Mail Server (MX)- record type that reports mail programs, like Sendmail or Qmail, where the mail server is located (the server that needs to be contacted to deliver mail in this domain). Without this record, mail for this domain will be delivered to the system (that server, host) whose IP address is indicated in the address record (Address, type A) for this zone.

Each MX record has priority, which allows you to offload the load between multiple mail servers. Accordingly, priority tells mailers (deliveries) which server will be contacted first. And then in descending order, for example, if a server with a high priority does not respond.

Note: High priority in in this context doesn't mean the most big number, and the smallest, i.e. 10 is higher than 50.

Servers with low MX priority are designed to forward mail to some host that would store mail. Then, when the mail server with the highest priority is free, it will take the letters from storage and send them to the address.

When adding or editing an MX record, you have two fields available to you. In the first one, you must enter the canonical hostname (host name) or a link to it (host name) of the mail server. The second field is intended for entering the priority of the MX record. Typically, the main server is set to priority 5. If you have only one mail server, then the priority does not matter. Additionally, you can set two mail servers to have the same priority. In this case, the server that will deliver the letter to the recipient will be determined randomly.

Host Information (HINFO)- a record type used to store information about the architecture and operating system of a certain host. For example, you may need to create an entry for the server test.example.ru that it (the server) is an x86 PC running FreeBSD. However, this is very rarely used, since such information can be used by attackers when preparing attacks.

When adding or editing this record type, the Hardware and Operating System fields are for entering the architecture and operating system host, respectively. You should enter data into these fields without spaces, replacing spaces with a ground sign, that is, “_” without quotes.

Text (TXT) - a record type that associates arbitrary text information with the selected zone (domain). That is, you cannot add a TXT record just somewhere. It can only be added when editing a certain zone. So this will be attached to the editable zone text information. This type can be used to attach comments to a certain zone (domain). Be careful, as this information can be read by anyone requesting zone (domain) information, so do not post sensitive information in the comments.

When adding or editing this type of record, the Message field is for entering a comment to the host. This text may also contain spaces.

Well Known Service (WKS) - a record type that associates the hostname, port and protocol of some service (for example, mail) with the selected zone. This could, for example, be used to indicate to clients which host is the mail server. However, most programs do not request WKS records, so in practice this type of record is often useless.

When adding or editing this type of record, the Address (IP address), Protocol and Services fields are intended for entering the IP address of the host of some service that is provided for this zone (domain); network protocol, which is used by the service - TCP or UDP; port number on which is provided this service, respectively.

Responsible Person (RP)- a record type that associates a person or group of people responsible for this zone (domain). The E-mail address (E-mail address) and Text Record Name (Name) fields are intended for entering Email addresses the responsible person and his name (first and last name), respectively. This type of record is rarely used.

Location (LOC)- a record type that is used to indicate the physical location of the host. In latitude and longitude coordinates. Perhaps it will be useful for large organizations with servers in different countries.

When adding or editing this record type, the Latitude and Longtitude field is for entering latitude and longitude. Example, for the host cambridge-net.kei.com there is 42 21 54 N 71 06 18 W -24m 30m .

Service Address (SRV)- a record type that associates a domain name, service name and protocol with some host. In other words, this entry is used to indicate the location of some service on some host. For example, this record type can be used if you want to indicate that the POP3 server for example.ru is mail.example.ru, and the web server is www.example.ru.

When adding or editing this record type, the Protocol and Service Name fields are for entering the protocol that the service uses (TCP, UDP, TLS) and the name(s) of the service (this name can be taken from the file / etc/services) respectively. The names of the services can be pop3, telnet and others. When a client is looking for some SRV record, the type of record request is as follows: _telnet._tcp.example.ru (For example, it could be like this). Webmin will automatically convert the entry you created to this (correct) form. This means that there is no need to create or edit this type of entry manually.

The Priority field is for entering the priority for this server, meaning priority is the same as the priority for MX records. The Weight field is for entering a number indicating the “weight” of this host. User requests will be predominantly to the server that has more “weight”.

The Port field is intended for entering the port number on which this service is provided.

Public Key (KEY)- a record type that associates a “key” with some host. This key is used for IPsec VPN.

Post types available in the reverse zone:

Reverse Address (PTR)- a record type that associates a hostname with an IP address in the reverse zone. For DNS clients, you need to look for hostnames at a given IP address. You should create one entry of this type for each host. However, in most cases this can be automated. Webmin can add an address record to the reverse zone immediately after the corresponding address record is added to the forward zone. That is, Webmin can synchronize the forward and reverse zones.

When adding or editing this type of record, the Address (IP address) and Hostname (Hostname) fields are intended for entering the IP address (For example, 192.168.1.5; This address will be automatically converted by Webmin into the in-addr.arpa format used by DNS server for the reverse zone) and hostname (host name) in canonical form (For example, test.example.ru . ), respectively.

ATTENTION: When entering Hostname, be sure to add a period at the end. This is not a typo.

Name Server (NS)- the NS record type in the reverse zone is intended for the same thing as in the forward zone - it tells other DNS servers the IP address or hostname (host name) of the server serving a certain zone (domain) or some subdomain.

The Zone Name field is intended for entering the name of the zone that this server serves. Typically, the name of the zone is the same as the name of the zone to which this entry is added. In this field you should enter a value in the format in-addr.arpa (Since there is no synchronization, as in address records - type A and PTR). Therefore, the Zone Name for 192.168.1 will look like 1.168.192.in-addr.arpa . (The period is required at the end, this is not a typo) In the Name Server field, you must enter the IP address or hostname in canonical form (for example, ns1.example.ru).

Name Alias ​​(CNAME)- a record type in the reverse zone, intended for the same thing as in the forward zone - alias, link, binding to some record. In the Name and Real Name fields, you should enter the value in in-addr.arpa format, since Webmin does not do this automatically.

Any Internet user who has domains on the servers of hosting providers can create and edit their DNS records. DNS records have a Name, Record Type and Address. These names may change in different panels. For example, it could be like this:

Name/Host/Alias; Record type; Meaning/Answer/Destination/Address.

In all options, the “Record Type” remains the same.

Entry name

The record name, also known as host/alias, is the domain name to which the record being created belongs or is associated.

When creating an entry, the domain name is indicated in full in the “Name” field. The subdomain or alias name does not need to be specified in full. It is enough to indicate the third level name: mail, www, ftp. If you enter your full name, be sure to put a period at the end. That is name mail and mail.example.ru. is the same name in the Name/Host/Alias ​​field.

DNS record types

Let's look at the main types of DNS records that you will encounter when servicing your domains.

Record Type A

Record type: A (address record) or (Internet 4 address). This type of record associates a specific domain name with a specific, precise IP address.

You can add more than one IP address for one domain (hostname). This is necessary if a firewall is used. To do this, you need to add a second record of type A, similar to the first. By specifying only a different IP.

In theory, you can specify more than one domain for one IP address. But this is not necessary, since the Domain Name System (DNS) has a record specifically designed for creating aliases. This record type is called CNAME.

Record type AAAA

Record type: AAAA (address record for IPv6) or (Internet 6 address). Same. Same as record type A, but the IP address has appearance via IPv6 protocol. For example: IPv6-2a03:4900:0:3::99:155

CNAME record type

CNAME (canonical name record). A CNAME record allows you to have and use more than one domain name (host) on a server.

First, one type A record is created for one IP address. The domain name in the Type A record is called the canonical name. Other domains are called mnemonic. Mnemonic names can be aliases (arbitrary names) or subdomains. Here's an example CNAME record:

popov.example.ru. CNAME example.ru.(don't forget the periods at the end).

A server can have any number of aliases. For each alias, you need to create a CNAME record.

Another example of a CNAME record:

hosting-1 IN A 8.8.8.8

www IN CNAME hosting-1

ftp IN CNAME hosting-1

We buy a second IP and transfer the ftp subdomain to the second IP:

hosting-1 IN A 8.8.8.8

hosting-2 IN A 8.8.8.9

www IN CNAME hosting-a

ftp IN CNAME hosting-b , move to the second FTP hosting-server.

Another example of a CNAME record:

hosting-1 IN A 8.8.8.8

peter IN CNAME hosting-1

oleg IN CNAME hosting-1

We associate aliases with the following CNAME records:

example.com. IN CNAME example.ru.

www.example.com. IN CNAME example.ru.

test.example.com. IN CNAME example.ru.

Thus, we link the domains example.com, www.example.com, test.example.com with the canonical domain example.ru. The periods at the end are required.

Another example of redirection using a CNAME record

www.example.ru. IN CNAME example.ru.

Typically, servers by default create CNAME records only for subdomains of the main domain and do not create them for other domains (as in the photo).

MX record type

MX (mail server). This entry creates a subdomain that is served by an internal (its own) mail server.

For example: Name/host/alias - example.ru; Record type -MX (mail server); Meaning/answer/destination/Address – mail. With this entry you create a mail subdomain mail.example.ru. If you are using the internal mail service of the server, then you need to create a record type “A” for the mail.example.ru subdomain. Name: mail - A (record type) - Address: server IP.

As postal service You can use third-party mail servers. To do this, you need to link your domain to a third-party mail server. It will automatically create an MX record for you. If they don’t create it, they will give you the address of the mail server. After this, you need to create CNAME and MX records on your server.

Use the CNAME record to redirect the mail domain mail.example.ru. to the address mail domain. And an MX record for the domain example.ru itself. set the address of your third party mailbox. As an example, you can use the Yandex mail server.

  • For Yandex, the MX record type will be like this:

Name/host/alias - example.ru; Record type -MX (mail server); Meaning/answer/purpose/Address – mx.yandex.ru. Priority 10.

  • The CNAME type is:

Name/host/alias – mail; Record type –CNAME; Meaning/response/destination/Address –domain.mail.yandex.ru. Priority 10.

On the Yandex mail server, without domain delegation, you can connect it only to the Yandex mail server by creating a mailbox there.

In addition to Yandex, using MX records you can link a domain to mail servers Google, Mail.ru and others:

Record type NS

Record type NS (name server). This is perhaps the most important type of recording. It defines domains (addresses) DNS servers servicing this domain.

Record type TXT

TXT( text entry) . This information record. It does not carry a functional load.

Record type SOA (Start Of Authority)

SOA record type shows where the basic information about this domain is stored on which server. The SOA record type specifies the fully qualified domain name of the zone. The qualified domain name must end with a period. An SOA record may have an @ symbol instead of a qualified name. In this case, the domain name will be taken from the configuration file.

  • Arbitrary serial number data versions (Serial). When a secondary server requests a data update, it first checks the serial number;
  • The frequency of the request for updating data from the secondary (Secondary) server (Refresh), in seconds;
  • The period for re-requesting the secondary server in case of primary failure (Retry);
  • Data expiration date (Expire), otherwise the expiration of time after which the secondary server will stop servicing requests if it fails to restore communication with the primary server, in seconds;
  • And lastly, the time to live of DNS zone data in the cache of the server that requested it, in seconds.

Here's an example of a SOA record for Microsoft DNS

How to edit DNS records in the ISPManager panel

In the ISPManager DNS panel, records are edited on the tab: Domain names→ “Click” on the domain.

How to edit DNS records in the DirectAdmin panel

In the DirectAdmin DNS panel, records are edited on the tab: DNS management.

Attention! The “DNS-master” panel is included in the “Primary-Standart” service package from nic.ru. Before you start, make sure that it is available in your personal account.

Primary domain binding.

To link the main domain you will need to add 3 records like:

  • www CNAME test site.
  • @A 164.132.93.140
  • @A 164.132.93.141

How to do it:

1. Go to the nic.ru domain control panel
2. In the “Services” section on the right, select “DNS hosting”:

Please note that if in the next window you see the message “Services not found”, it means DNS hosting, required to edit the DNS zone, has not been purchased.

Go to the “Order new services” section:

And choose the appropriate tariff. Optimal - 600 rubles per year:

3. If DNS hosting has been purchased, you will see the following window. Click on the “Manage DNS Zones” button next to the desired domain:

4. In the "List of domains" section, select the desired domain:

5. Click the “Add” button new entry” in the zone editing panel:

6. Fill in the fields as follows:

Name: @
Type: A
IP address: 164.132.93.140

Click the Add button to the right of the entry:

Similarly, add another record of type A with the value:

@ A 164.132.93.141


Alias: www
Type: CNAME
Canonical name: testsite.(you need a dot at the end!)

And click the "Add" button:

8. After the entries have been added, click the “Unload zone” button at the top right:

9. If a message appears about an undelegated domain when adding records, click “Delegate domain”:

You can also delegate a domain from the domains section:

It may take 24-48 hours for DNS to update. If after this time the domain/subdomain you linked does not display a 404 page in the LPgenerator branding, please contact us at support@site.

Please attach a screenshot to your letter. current state DNS - this will significantly speed up the process of solving your problem.

Subdomain binding

If you have a website hosted on your main domain, or plan to host it, it makes more sense to create a subdomain and link it.

To link a subdomain in the nic.ru panel, you need to add 2 CNAME type records:

  • www..

How to do it:

Linking a subdomain differs only in the records that you will add, so up to 4 action points remain the same as when linking the main domain.

5. Click “Add record” and fill in the fields like this:

Alias: promo(promo is an example, you can come up with any subdomain name, just don’t mix Latin and Cyrillic in the name)
Type: CNAME
Canonical name: testsite.(you need a dot at the end!)

6. Add another entry and fill in the fields.