CityHost.UA
Help and support

Domain DNS record types: NS, A, AAAA, CNAME, TXT, ALIAS, SRV

 7981
10.02.2023
article

What are DNS domain records?

Domains exist and work thanks to DNS (Domain name system). This is a complex of root DNS servers, the main task of which is to convert a domain into an IP address.

Domain names are created to make it easier for people to remember them and write them in the search bar. In fact, the site is located at an IP address that looks like this: 148.251.15.181.

The DNS server receives a request in the form of a domain, searches its database for a match to a certain IP address and directs the user to the site hosted at this address. In addition, the system uses additional DNS records that contain information about the domain. The user can independently add and edit them in the control panel.

You will find this option under DNS => Control icon opposite the domain name.

types of dns records

By default, the main types of DNS records — A (AAAA) and NS (after the procedure of forwarding the domain to hosting) are already set for the domain and all subdomains (marked as *). Without them, the domain will not work properly, and users will not see the site. Other DNS records of the domain are auxiliary and are needed to configure certain services, enter additional information or redirect.

In the Cityhost control panel you will find the option to add the following records: A, AAAA, MX, NS, CNAME, TXT, ALIAS, SRV. We will talk about them. There are also other types of DNS records, but some of them are outdated or rarely used.

creation of domain dns records

NS record

This type of record is the main one that customers have to deal with. This entry means servers that support domains, it stands for Name Server.

It is changed when the domain is transferred to another hosting provider or registrar, and the NS servers of the popular Cloudflare service are registered here if you decide to connect it.

If the information about nameservers is not specified or written incorrectly, the browser will not find the site.

For better fault tolerance, ISPs use a minimum of two NS servers, so you'll usually see two entries. Cityhost uses three NS servers to support each domain, so you will see three such entries in your account.

You can find this information in the section: Domains => the domain management symbol in front of the name.

NS domain records

A and AAAA records

The A-record is designed to convert the domain into an IP address, after which the browser can already find the server and the site hosted on it.

If the site does not have an A record, it is impossible to connect to it via the HTTP/HTTPS protocol, and the browser simply does not see it.

The type A record is used for the IPv4 protocol, which is currently running out of resources, but still continues to work in Ukraine. In addition, there is now a new IPv6 protocol, and its addresses have a different form, for example 2a01:4f8:201:7468::1. It uses the AAAA record, which is an analogue of the A record.

Currently, the sites of Cityhost clients are parked by two protocols at once, so in your settings you can see two types of records at the same time.

CNAME record

This entry is called a "canonical name", it allows forwarding from subdomains to domains.

It is usually used to redirect from the outdated www.domain.ua domain format to the standard domain.ua format. You can also use it if you need to create a redirect from a subdomain to a domain, for example, if the section on the subdomain is still under development and you don't want to show it to readers.

To create a cname record, you need to click on the "Add record" button in the DNS section, select the CNAME record type and enter the name of the subdomain in the corresponding line. This is the address from which the redirection will take place. In the "Value" line, enter the main domain to which the redirect will take place. TTL is best set as the default for creating all types of records.

cname record - what is it and how to create it

It is important to know that after creating a CNAME record for a certain subdomain, it is no longer possible to create other DNS records for it.

Read also: What is a subdomain and why is it needed?

MX record

Indicates the mail server used for your domain. Each client can create mailboxes on his domain so as not to use public services for sending letters. For example, having a name.ua domain, you can create a box my-box@name.ua or any other.

It is for such mailboxes that MX records are important, which are specified in the domain settings and show the IP address of the mail server that processes letters.

In this record, you can specify multiple servers and set priorities, in which case mail will be processed by more devices, which increases the reliability of the mail service.

MX is also important for sending mail - if this record is not specified for a domain, other servers will not be able to receive mail from it.

MX records are created in the same way as others - in the "Subdomain" field, enter the name of the subdomain on which the mail is created, or @ if it is the main domain. The priority value is specified from the lowest to the highest - the lower the value, the higher the priority.

MX record

Creating such a record is relevant for settings when you rent a VPS server or a dedicated mail server . In this case, the IP address of the server itself or its domain is entered in the value field.

If you use hosting, the Cityhost mail server is registered in it by default. If necessary, you can configure the mailbox settings in the section Hosting 2.0 => Mail.

mail server settings

And one more option — in the DNS section, there is a "Mail Settings" section for automatically saving settings for the selected mail service.

TXT record

It is a multifunctional text record that can be read by both humans and computers. It is used to register additional information about the domain.

It may contain information about the administrator's mail, an electronic signature that confirms the right to own the domain, and other data.

It is through TXT records that DKIM, DMARC and SFP signatures are created, which increase the trust of postal services in your correspondence and reduce the risk of falling into SPAM.

You can learn more about this from the article SPAM: why letters end up there and how to avoid it .

ALIAS entry

Aliases are aliases of the main domain, of which there can be several. The redirection function between domains is performed in various cases:

An ALIAS record allows you to create redirects for domains, not just subdomains like a CNAME does.

To redirect, you need to enter the address of the domain to which you plan to redirect in the "Value" field.

Record SRV

An SRV record for a domain (from the word service) is created to make the location of the server visible through the host name and port number. It is required when creating services such as IP telephony, mail, proxy or instant messaging.

With its help, you can connect several servers to one domain and set priority values for them. This helps to make the system more fault-tolerant, because if one server fails, its functions will be performed by lower priority ones.

It is important to note that the DNS system does not update immediately, so it may take some time for the created record to start working - this applies to all record types.


Like the article? Tell your friends about it:

Author: Bohdana Haivoronska

Journalist (since 2003), IT copywriter (since 2013), content marketer at Cityhost.ua. Specializes in articles about technology, creation and promotion of sites.

Technical consultant: Andrii Zarovinskyi

Head of Technical Support at Cityhost, author of instructional materials in the FAQ. Trains technical support staff and helps to solve the most complex customer requests.