This article describes operations in the advanced mode of the "DNS" product interface. Differences in interfaces modes are described in the article "Getting started with 'DNS'".
1. Go to records settings
Open the “All zones” tab and select the domain zone you want to add records for. Click it or select "Go to records" in the menu.
The "DNS records" section will open. Click “Add record set”.
You will see the interface for adding new DNS records. Perform other steps in it.
2. Select record type
In the “Type” field, select the type of DNS record. There are seven types available:
- А — defines the IP address the domain corresponds to. A record is for IPv4 addresses of the form 22.214.171.124.
- AAAA — defines the IP address the domain corresponds to. AAAA record is for IPv6 addresses of the form 7625: 0d18: 1fa3: 07d7: 1f44: 8a2e: 07a0: 678h.
- NS — defines addresses of DNS servers serving the domain.
- CNAME — maps resource records of one domain to resource records of another. If you specify a CNAME record for site.com with the value “anothersite.com”, then when you open site.com it will have the same DNS records as anothersite.com has (for example, it will requests the same IP if A/AAAA records for anothersite.com exists).
- MX — defines the server that receives mail for the domain.
- TXT — defines auxiliary information about the domain. For example, you can specify Sender Policy Framework (SPF) rules that determine mail servers allowed to receive mail.
- SRV — defines the server that operates certain services for the domain.
- CAA — defines the certificate authorities who are allowed to issue an SSL/TLS-certificate for the domain name.
3. Specify subdomain record belongs to
In the “Name” field, specify which domain or which subdomain the record belongs to. To add a record for:
- main domain (apex/naked domain; in the picture above it is examplesite.co) — leave the field blank;
- specific subdomain — enter the name of this subdomain (for example, if you enter "one" in the picture above, the record will be created for one.examplesite.co);
- all subdomains at once (wildcard record) — enter an asterisk (*).
4. Specify content of record
Fill in the "Content" field. Enter a value appropriate for your record type.
The IP address (IPv4) of the server of the web page that will open by your domain name.
The IP address (IPv6) of the server of the web page that will open by your domain name.
The name of the zone you want to delegate your domain to.
The domain or domain zone name that your domain should refer to.
The name of the mail server that receives mail for your domain.
The canonical name of the machine providing the service. SRV record contains 4 elements: priority weight port target.
Example: 0 5 5060 sipserver.example.com.
Text information the record should contain.
Defines the certificate authorities who are allowed to issue an SSL/TLS-certificate for the domain name. The recording consists of three parts which are separated by a space.
CAA [flags] [tag] "[value]"
The "value" must be enclosed in double-quotes ("").
Example: 0 issue "comodo.com"
5. Specify TTL
TTL (time to live) is the interval in seconds used by servers on the Internet to check if the DNS records for your domain have changed.
Example: A-record has a TTL of 300. You have changed the value of this record from “126.96.36.199” to “127.0.0.7”. Within 5 minutes, when requesting your domain, users will be sent to a server with IP 188.8.131.52 (this value will be stored in the cache of recursive DNS servers). But after 5 minutes, the DNS server will check the settings and see the new value of the A-record. Now, when your domain is requested, the DNS server will send users to the server with IP 127.0.0.7.
6. Add additional records of the selected type (optional)
You can add multiple records of the same type to your domain at once. Click "Add record” to add another record. A new line will appear, there you can enter the content of the second record and the associated metadata (read about metadata in step №7). Any record can be deleted by clicking the "—" button next to it.
7. Configure balancing (optional)
Our DNS server can give different DNS records to different users — for example, send users from Asia to an Asian server, and European users to a European one. This is called balancing. To enable balancing, move the slider in the "Records selection using metadata" section. If balancing is not needed, leave the slider disabled and go to step №8.
Balancing is based on the metadata you add to each record. You can add seven types of data: coordinates, ASN, continent, country, fallback, or notes. The system will check if a user corresponds to the specified parameters: if he or she does the system will give the record, if not it will not give. For example, you can add metadata of the "continent" type with the value "Africa" to a record, and it will only be given to users from Africa.
There are two types of balancing available: by coordinates and by ASN/country/continent.
Balancing by coordinates (Geo Proximity)
You add coordinate for each records. When requesting your domain, the user will receive the record with the nearest coordinates.
To use balancing by coordinates select "by latlong metadata (geo coordinates)". Add latlong (latitude and longitude, coordinates) type metadata to the records.
Using the map icon, you can check if you entered the coordinates correctly: click on it and you will see the place that corresponds to your parameters.
An example. Below you can see the parameters with which the user will receive an A-record with the value "184.108.40.206" if he or she is nearer to the coordinate 51.52318152049715/-0.13458412218999416 (the center of London) and an A-record with the value "127.0.0.7" if he or she is nearer to 48.859741241898114/2.3415648470109653 (the center of Paris).
Balancing by ASN, country, or continent (Geo DNS)
You add metadata of different types to each record. When requesting a domain, a user will receive the record, if its metadata matches the users' characteristics.
You can add the metadata of five types:
- asn — autonomous system number,
- continents — continent,
- countries — country,
- fallback — add fallback metadata to the records, that should be sent if the user does not correspond to other metadata,
- notes — any comments, this metadata type can be used as a field for notes; for example, you can specify a city, data center name, or a cluster name.
Our system will check if a user matches criteria from the metadata in the following order: ANS, country, continent. The choice of the answer is as follows:
- Our DNS server receives a request to the domain.
- The DNS server compares the user's ASN with the ASNs from the metadata. If they match, the server sends the record for which the user's ASN matches.
- If ASN doesn’t match or is not specified in the metadata, the server compares the user's country with the countries from the metadata. If they match, the server sends the record for which the user's country matches.
- If the ASN, and country do not match or are not specified in the metadata, the server compares the user's continent with the continents from the metadata. If they match, the server sends the record for which the user's continent matches.
- If the user does not match all the criteria above, then the server sends a record with fallback type metadata.
To start balancing by ASN, country, or continent, select "by non-coordinates meta". Add the required metadata for each record. To add multiple metadata to a single record, click the "+" button on the right. Metadata can be deleted using the "—" button.
The configuration is complete. As soon as you finish creating records, balancing will work.
An example. Balancing is configured as follows:
A Danish user with ASN 20001 makes a request to examplesite.co. Our DNS server will:
- Compare the ASN of the user with the ASN from the metadata. The number is specified for the upper record (123456), it does not match the user’s number (20001), the upper record is not sent. The same for the lower record.
- Compare the user's country with the countries specified in the metadata. The country is specified only for the lower record (Finland), it does not match the user's country (Denmark), the lower record is not sent.
- Compare the user's continent to continents specified in the metadata. The continent is specified only for the upper record (Europe), it matches the user's continent (Europe). The upper record is sent, the user goes to the server with IP 220.127.116.11.
8. Specify the maximum number of responses (optional)
If you are using balancing, fill in the "Max records per response" field. Here you specify how many records of the same type can be sent to the user.
An example, balancing by ASN/country/continent. As a result of balancing, it turned out that four A-records are suitable for the user at once. If you entered the number "2" in the "Max records per response", our DNS server will send only two A-records. These records will be randomly selected from the four ones that match.
An example, balancing by coordinates. Four A-records with different coordinates are available, and the number "2" is specified in the "Max records per response". Our DNS server will send the user two records with the nearest coordinates.
9. Complete the configuration and create resource records
After completing the configuration, click the "Create" button. DNS records with the specified parameters will be created.