DNS Hosting lets you add domains, resource records, and reverse zones (PTR records) on Selectel’s authoritative NS servers.
You can host any number of domains and records for free, whether you use other Selectel services or not.
You can manage your domains and records in the Control panel or using the API.
Selectel DNS Infrastructure
The Selectel DNS infrastructure consists of:
- the server API that receives requests;
- a database cluster that stores information about domains and records;
- several NS servers. Each server has a local copy of the database and runs an NS service that responds to requests.
In each data center and between data centers, Anycast balancing of NS server addresses is used for stable operation. The service will continue to work as long as at least one server is working, even if several fail.
The public IP addresses of Selectel’s authoritative NS servers (ns1.selectel.org, ns2.selectel.org, ns3.selectel.org, ns4.selectel.org) are protected by the DNS Firewall. The DNS Firewall protects your DNS infrastructure against DDoS attacks.
The records are stored in a PostgreSQL database. Replication is performed to PostgreSQL slaves on authoritative servers from the database cluster (PostgreSQL Master).
Domain Registration and Delegation
A domain name must be registered — rented from a company-registrar of domains for a certain period of time. For all domain zones, the minimum registration period is 1 year, and the maximum is determined by the domain zone. For example, for the .ru zone, the registration period is 1 year, for .com zone it is up to 10 years. In order to remain the owner of the domain and continue to run your website after the registration period expires, the domain must be renewed.
Please note that Selectel does not provide domain registration and renewal services.
Domain names need to be delegated — transferred to DNS servers after registration. The servers will record which IP address the domain corresponds to. All requests to the domain will be forwarded to these servers.
If you use the DNS hosting service, you need to delegate your registered domain to Selectel’s NS servers. To do this, specify the following servers on the registrar side (the NS-type resource records in the Selectel Control panel will be added automatically when adding a domain):
ns1.selectel.org ns2.selectel.org ns3.selectel.org ns4.selectel.org
How to Connect a Website to a Domain
By using an A record, you can connect a website to a domain — bind the domain to a specific IP address. In this case, accessing the domain will open the website located on the server with the specified IP address.
If your domain is delegated to Selectel’s NS servers, follow these steps to connect a website to a domain:
- Check that the domain has not expired and is delegated to Selectel’s DNS servers.
- Add a domain in the Control panel.
- Add an A record with the IP-address of your server as the value.
Later, when accessing the domain, requests will be forwarded to this IP address.
NS servers cache resource records for no longer than the time specified in the TTL for that record. The TTL is the period of time after which the cache will request information about a record’s update.
Records can be stored for the entire TTL or for a shorter period of time. It may take a few minutes to 72 hours for records to be updated.
To view a particular record (NS, SOA, and A) and its TTL, run:
dig @ns1.selectel.org yourdomain.com A
A is the record type (the A record in this case).
To check which NS servers the domain is delegated to, run:
dig yourdomain.com NS
To check that the authoritative NS servers are responding correctly, run:
dig @ns1.selectel.org yourdomain.com A ... dig @ns4.selectel.org yourdomain.com A
One A record is usually specified for one domain name, and the DNS server returns one IP address. DNS-balancing allows you to specify several A records for one domain with different IP addresses. You can use this method to distribute the load among several servers and transfer the loaded service to a new host group.
The Round Robin algorithm determines which server will receive the request. The first request is sent to one server, then the second to another server, and so on. Once the last server has been sent a request, the cycle starts anew.
The DNS server returns all records from the database for the requested domain name in random order. The DNS client (on the user’s local machine) uses only one record from the list received and addresses the specified IP address. Due to the high number of users, each IP address has the same number of connections.
We recommend using no more than 5-10 records at a time, as the services may impose additional restrictions.
How to Move the Website to a New IP Address
To move the website to a new IP address, from the Control panel:
- Go to the DNS Hosting ⟶ Domains section.
- Select the desired domain and start editing the A record.
- Decrease the TTL value of the A record (for example, to 300).
- Wait for a time equal to the old TTL value of the record.
- Edit the A record again, changing the IP address to the new one.
- Check that requests only go to the new server, and that there are no requests from users on the old server. You can then turn off the old server and release the old IP address.
- Edit the record by increasing the TTL value (for example, to 86400).