What are domains, hosting, DNS servers and IP addresses. What is DNS? Why change DNS when changing hosting?


Briefly: If fault tolerance and availability of the site at any time come first, then the best solution there will be paid DNS (for example, Amazon). Paid services also suitable if attackers are DDoSing your nameservers.

If you don't want to depend on third party companies and manage DNS yourself, your choice - own servers names Responsibility for their performance lies with you.

If you don’t want to deal with placement and configuration issues, and short-term failures are not critical, then your choice is free DNS or a DNS provider.

What is a DNS server and what are they?

DNS server(NS, Name Server, name server) is responsible for converting a domain name to an IP address. Using the IP address, the browser opens the requested website.

Example of domain to IP address conversion

website → 80.87.203.35

There are several options for hosting DNS servers:

Usually you use your own servers or hosting servers. Let's consider the options in more detail, identifying the advantages and disadvantages of each of them.

Provider DNS server

When purchasing a server, hosting companies may provide free name servers (both primary and secondary). This option is suitable for those who don’t want to bother: when you add a domain in the control panel, the remaining parameters are configured automatically (this is how it works on our hosting).

The main disadvantage is that hosting providers provide DNS services with basic functionality. They cope with the basic task (domain to IP translation), but additional functionality (API, IPv6, DDNS, Geo Routing) is missing or reduced.

All clients use common nameservers. If a strong one is ordered on the NS of one of the clients DDoS attack, then all other clients may experience disruptions. Despite this, hosting companies try to protect their DNS from DDoS.

Easy to set up

There is no need to monitor the state of the DNS server

Free

– The service may not be available on all hosting sites

– Impossibility API usage

– Possible malfunctions

Own DNS server

Suitable for owners of virtual and dedicated servers. The client hosts the DNS on its own server, usually on the same server as the site.

Setting up using the panel. Most control panels support setting up nameservers. FirstVDS clients use the ISPmanager panel, which has this feature - see the setup guide.

Self-configuration. You can configure name servers without a control panel. To do this, just install a DNS server program (for example, BIND) and create configuration file according to the sample. See setup guide for popular operating systems. Don't forget to open port 53 for TCP and UDP packets!

DNS server and DDoS protection. If you use DDoS protection services, it is not recommended to host the DNS service and website on the same server. DDoS protection services can block all UDP traffic in case of strong attacks, and clients cannot access the name server - the site will be unavailable domain name. In this case, DNS should be located on a separate server.

Independence from third party resources

Opportunity DNS settings for yourself and use your own scripts

Free

– Requires 2 IP addresses

– Difficulty setting up

– Independent performance support

– Possible problems if DDoS protection is used

Registrars require that each domain have at least two name servers: a primary (master) and at least one secondary (slave). The addresses must be two different IP addresses.

To satisfy this requirement, an additional IP address is connected to the server. The primary address is designated as the primary NS, and the secondary address is designated as the secondary NS.

Free DNS hosting

Free DNS hosting - good decision, if you do not have the ability to administer the DNS server yourself. But be careful: often in conditions free services disclaimer is stated. There may be restrictions on the number of domains and the number of requests per month. Posting commercial projects may be prohibited. Study the terms and conditions of the chosen service well.

Free

The ability to find a service that suits the conditions and capabilities

– Not responsible for performance

– API is missing or inconvenient to use

– Restrictions on allocated resources

Paid DNS hosting

Paid DNS hostings, unlike free ones, guarantee a level of service and provide a set of additional features. Amazon Route 53 stands out among others. This DNS hosting is positioned as fault-tolerant and highly available. He already has a transfer current settings from other servers and a full-fledged API for which many ready-made recipes have been written.

fault tolerance

Full API

Additional functionality

– Payment

Why do you need an API on DNS hosting?

The most common application is to create a fault-tolerant system. For example, we have two servers. Server A is the main one, it hosts the site that visitors access. Server B is a backup server; it stores an up-to-date copy (replica) of the main site.

Let's imagine that we rent a paid DNS server. If the site is operating in normal mode, then the data is sent from server A. On server B there is a script running that checks the availability of the site to server A. If it stops working, then the script uses the API to access the DNS hosting and writes the IP-record to the A record. server B address. The site continues to work from the backup server.

Since the switching occurs with minimal delay, visitors will not notice the switch.

CDN proxy

CDN proxies (Content Distribution Network) stand out, which can also be used as DNS. The most popular is CloudFlare. CDN proxies speed up website performance by caching data on a distributed network of servers. The site is served to the client from the server closest to him. CDN can also filter malicious requests (protect the site from DDoS).

CDN networks have a serious drawback: the IP address for domains hosted in the CDN is assigned randomly. Those. it will be impossible to access the site or server directly using the IP address.

In addition, the site may be blocked in the Russian Federation. IP addresses of sites with prohibited content are blacklisted by Roskomnadzor and blocked by providers (and this is not uncommon for CDN networks). If your domain accidentally gets one of these addresses, the site will be unavailable. For this reason, it is necessary to carefully select a CDN provider and find out in advance about blacklisted IP addresses and possible problems with them.

Increasing the speed of content delivery

Protection against malicious requests

Ease of use

fault tolerance

– IP addresses may be on Roskomnadzor blacklists

How to connect a domain and hosting (how to register a DNS server)?

First, let's talk superficially about DNS. What is DNS and why is this technology needed?

The fact is that any computer on the Internet has a specific IP address with which you can access it. Usually given address is a four-byte number separated by dots, for example 32.164.12.143 or 32.134.234.103. Those. Without knowing the computer's IP address, it is impossible to send it information or a request.

The Internet has always had a growing trend, i.e. the number of sites and the number of visitors grew. To an ordinary person remember a large number of IP addresses are not so easy, and therefore a means was needed to alleviate the plight of users. Such a means became DNS- domain name system.

Now let's remember what a domain name is. Domain name is an alphanumeric name separated by dots (for example, http://www..google.com).

So here it is DNS is a tool that allows you to determine an IP address from a domain name.

Now about how to connect a domain and hosting. If the domain and hosting were purchased in one place (well, as usually happens, I bought hosting and received a domain as a gift), then as a rule there is no need to connect anything, everything already works. However, if the domain and hosting were purchased in different places, then you need to link the domain and hosting. To do this, you need to specify in the domain control panel DNS servers Your hoster. Thus, through the DNS server data, your domain name will be assigned an IP address, i.e. You will be able to access files located on the hosting.

Where can I find these DNS servers? Usually, after you have created and registered a hosting account, you receive an email containing your contact information, login, password, etc. , so, there is also data about DNS servers :) If suddenly you lost this letter, you can find out the DNS server from the hosting support service.

Well, for example, here’s a quote from the letter that came to me after registering hosting on Sweb :

"If you want to send a domain to our hosting, then specify our DNS servers for the domain:

ns1.spaceweb.ru 77.222.40.2

ns2.spaceweb.ru 77.222.41.3

As you can see, the DNS servers are indicated in the letter. Moreover, the names are indicated first, and then the IP addresses (i.e. the name ns1.spaceweb.ru corresponds to IP 77.222.40.2 ) . In the domain control panel, the names of the DNS servers are usually indicated.

IN in this case, in the domain control panel, you need to specify two DNS servers: First - ns1.spaceweb.ru , second - ns2.spaceweb.ru .

Thus, you need to go to the domain control panel, find something like "DNS management" or "DNS Settings" Everywhere is different, after that go there and register the DNS server of your hoster there.

Rice. 1 Example of a domain control panel


Rice. 2 Example of registering DNS servers in the "DNS Management" section

Now you just have to wait from 12 to 72 hours until the DNS servers are updated and your site will become available on the Internet.

Rate this lesson: 1 2 3 4 5

Comments:

Thanks Andrey

Thanks Andrey, very useful!

Andrey, thank you very much)))

Thank you! I looked around in my c-panel and didn’t find anything like that, but something like a subdomain, etc. I found... I'm creating a "museum" site, a group of programmers wrote it, then it was redone, and I delve into it and dig it along the way... So THANK YOU SO MUCH for your brotherly, selfless help!

Thank you Andrey, thank you very much!!!

Do you need it?

Rarely has a person helped me like you!

Thank you very informative

Thank you very informative

Thank you. They dug up the entire RuNet, but only here they found the answers.

But if the domain name and dns are in one place and the hosting is in another, then what?

Well done good site

Thank you so much accessible language written)))

Thank you, the topic is presented perfectly!!!

Just what you need. Thank you. For the first time I registered hosting and domain separately. I used the tips as in the manual

They wrote about DNS in a very accessible way, I understood everything right away. Thank you)

I didn’t find anything about DNS on Yandex, I accidentally came across this site and everything immediately became clear) thanks

you help millions)

thank you very much, helped me out))

Thanks a lot! It’s rare to find something that’s normal and written in Russian. Respect for quality content!

Yeah, here you say that you can regist domains in sweb, but you’re sitting on Domec

And on SpiceWeb there are also 5 domains. So don't...

Thank you! I'm waiting for the servers to update...

THANK YOU, simply and clearly, I sent you a personal letter of gratitude through the Ministry of Education

Andrey, I read that you can link one domain to several different hosters? Will this affect the IC of the domain?

Thanks Andrey. I wish your site prosperity! Excellent resource!

A huge thank you! Very useful resource!

Thank you for the article. Got a question. There is a domain name associated with the blogger blog system (name.ru) There is a second server with a static white IP with a correspondingly different IP. Question: Is it possible to register a DNS server so that the 2nd server has the page name.ru/any name/? I would like to have file hosting on a second server for a blog on the Google system.

Thank you. Interesting article. What DNS should I register if I want to attach a domain to my server???

Thank you! We clarified something!))

Can you tell me where to find the DNS settings on Blogbugs.org?

It's time to talk in detail about our service, which we provide free of charge to our users of SSD VDS or dedicated servers from ITLDC. We will talk about a DNS hosting service or, in other words, about providing a cluster of secondary NS servers.

As is known, for placement domain zones at least two NS servers are required, which must have different IP addresses, preferably from different networks. Some users order an additional IPv4 address for this, install it as a secondary (alias) on their server and process DNS requests locally, from one server or VDS.

Undoubtedly similar method has the right to life - moreover, it is widely used. However, this option has one significant drawback- if the server is unavailable, all DNS-related services will not work, and users who make requests at the time of problems will “cache” the so-called negative response (that the host was not found) for 10-15 minutes.

That is why it is recommended that DNS servers be located in different network infrastructures and locations - in this case, all incoming requests will be processed correctly, regardless of the availability of the main server. A pleasant side effect of this is also more high speed response to DNS queries.

The system is designed in such a way that the “primary” DNS is located on the user’s server or VDS, where the original master copies of domain zones are stored, but it does not process user requests. The task of primary DNS is to enable our DNS cluster to receive instances of domain zones; this update occurs after each change in the master copies or once every few days. After this, all requests are processed only by our DNS servers - as quickly as possible.

We use four synchronized DNS servers located in different locations - in Holland, USA, Bulgaria and Ukraine. The names of these servers are neutral - nsX.layer6.net, where X is a number from 1 to 4. The servers are located in different segments of the Internet and have excellent characteristics network availability, as required for correct operation DNS.

Ordering the service is very simple - in the services section of the self-service system, select “DNS Hosting”, then “Secondary NS (ns*.layer6.net)”. Please note that the service is free for those users who have other active services - on last step order in this case the cost of the service will be €0.00. In a few minutes, DNS hosting will be activated and you will receive an activation message with detailed description way to configure your ISPManager panel. If the panel is not used, you will need to independently edit the configuration of the “main” DNS server (allowing transfer and notify), and also manually specify in the service management interface the domain names that should be processed by our DNS cluster.

If you need to manage DNS records for a domain and it does not provide such an opportunity, you can use third-party name servers, for example, free service“Yandex DNS hosting”, which comes complete with “Yandex Mail for a domain”. This article will cover:

First you need to register an account on Yandex. If you already have an account, please proceed to the next section “Connecting a domain to Yandex”.

After filling out all the required fields and confirming your phone number by entering the SMS verification code, we recommend going into details account by clicking on her name on the right top corner, and by selecting the “Passport” section, indicate personal data: in particular, Security Question and the answer to it. This information will simplify the restoration of access to your account if your password or login is lost.

After this, you can start connecting the domain.

After logging into your account, you need to connect the domain. This can be done using the link: https://pdd.yandex.ru/domains_add/

You can also go to “Mail for a domain” this way: in your account in the line with available services Click “more” and select “All services” from the drop-down menu.

After that, select “Mail for Domain”.


Enter the domain name and click "Connect Domain". After this, you will be automatically redirected to the domain ownership confirmation page.

Domain delegation to Yandex

Delegating a domain to Yandex involves sending the domain to the appropriate public name servers and gaining the ability to manage DNS records in the functionality of this service. If you delegate a domain within 24 hours after connecting it and the connection has not been made previously in another Yandex account, then the domain will be successfully delegated after the process of updating DNS records goes through (it can take up to 72 hours from the moment the name servers are changed in the registrar panel ). Otherwise, you will need to verify domain ownership.

To delegate a domain to Yandex, specify the name servers dns1.yandex.net and dns2.yandex.net in the domain registrar panel. If the domain registrar's functionality includes fields for specifying IP addresses of nameservers, you do not need to fill them out.

After updating the DNS records, the domain status will be changed to “Domain connected and delegated to Yandex”:

Domain ownership confirmation

In order to confirm domain ownership, there are 3 alternative methods presented below:

Method No. 1 - file download

If you already have a hosted website, you will need to upload an html file with the name and content specified on the “My domains” page to its root directory.

Method No. 2 - setting up CNAME

For the specified subdomain, set up a CNAME record for the address mail.yandex.ru (with a dot at the end). To do this you need to have access to DNS editing records with your domain name registrar or hosting provider.

If you have an active service with us virtual hosting, you can specify a CNAME record in the cPanel hosting panel in the “Domains” section - “Simple DNS Zone Editor” or “Advanced DNS Zone Editor”.

If you purchased VPS from the site, then you can edit DNS records in the SolusVM panel according to our guide.

The added CNAME record will look like this:

Method number 3 - change e-mail

Specify the e-mail from the “My domains” page as a contact postal address domain registrant. This can usually be done in the domain name registrar functionality. Once domain ownership has been confirmed, you can change your email back to your original one.

After completing the steps according to the selected verification method, click “Verify Domain Ownership.” Please note that the process of updating DNS records takes some time and the domain may not be confirmed immediately. In this case, Yandex will also carry out automatic check at certain intervals. After confirmation of domain ownership, its domain status on the “My Domains” page will change to “Waiting for MX records to be installed” if the domain has not yet been sent to public Yandex servers. In this case, please refer to the “Domain Delegation” section in the current guide to delegate the domain to Yandex.

If the domain has already been previously sent to Yandex name servers, after updating the DNS records, the domain status will be changed to “Domain connected and delegated to Yandex.”

DNS hosting management from Yandex

After delegating a domain on the “My Domains” page, the following functionality will appear in its details (indicated in the screenshot):

To manage DNS records, you need to go to the “DNS Editor”.

Since the domain has already been delegated to Yandex, the DNS records necessary for Yandex.Mail and Jabber to work on your domain will be automatically added. You can transfer DNS records from previous nameservers to Yandex nameservers. To do this, click “Transfer NS records”, check their correctness and click “Transfer”.

Add missing entries if necessary. If you are adding an entry for your primary domain, leave the “@” icon in the “Host” field. If you are adding an entry for a subdomain, include part of the subdomain name without the main domain name. Select the DNS record type, enter a value, and click Add DNS Record. For example, for the subdomain my.domain.com the A record will look like this:

For the site to function correctly, the following DNS records must be present:

Host Type Record value
@ A XXX.XXX.XXX.XXX
* A XXX.XXX.XXX.XXX

Instead of XXX.XXX.XXX.XXX, specify the hosting IP address from which the site should open.

An example of DNS records for a domain is shown below:

Looking for where? We offer excellent. If you want virtual hosting, then you can not only order, but also receive a certificate as a gift for virtual hosting on the S4 tariff and for the xVPS40 VDS plan.

If your top priority is fault tolerance and website availability at any time, then paid DNS would be the best solution. Paid services are also suitable if attackers are DDoSing your nameservers.

If you don’t want to depend on third-party companies and manage your DNS yourself, your choice is your own name servers. Responsibility for their performance lies with you.

If you don’t want to deal with placement and configuration issues, and short-term failures are not critical, then your choice is free DNS or a DNS provider.

What is a DNS server, its types

DNS server(NS, Name Server, name server) is responsible for converting a domain name to an IP address. Using the IP address, the browser opens the requested website.

Example of domain to IP address conversion
firstvds.ru → 80.87.203.35

There are several options for hosting DNS servers:

  • Hosting provider DNS servers
  • Own DNS servers
  • Free DNS hosting
  • Paid DNS hosting
  • CDN proxy (in DNS mode)

Usually you use your own servers or hosting servers. Let's consider the options in more detail, identifying the advantages and disadvantages of each of them.

Provider DNS server

When purchasing a server, hosting companies may provide free name servers (both primary and secondary). This option is suitable for those who don’t want to bother: when you add a domain in the control panel, the remaining parameters are configured automatically (this is how it works on our hosting).

The main disadvantage is that hosting providers provide DNS services with basic functionality. They cope with the basic task (domain to IP translation), but additional functionality (API, IPv6, DDNS, Geo Routing) is missing or reduced.

All clients use common nameservers. If a strong DDoS attack is ordered on the NS of one of the clients, then all other clients may experience operational failures. Despite this, hosting companies try to protect their DNS from DDoS.

Pros:

  • Easy to set up
  • There is no need to monitor the state of the DNS server
  • For free

Minuses:

  • The service may not be available on all hosting sites
  • Inability to use API
  • Possible malfunctions

Own DNS server

Suitable for owners of virtual ones and those who want to buy. The client hosts the DNS on its own server, usually on the same server as the site.

Settings using the panel. Most control panels support setting up name servers. FirstVDS clients use the ISPmanager panel, which has this feature.

Self-configuration. You can configure name servers without a control panel. To do this, just install a DNS server program (for example, BIND) and create a configuration file according to the example.

DNS server and DDoS protection. If you use DDoS protection services, it is not recommended to host the DNS service and website on the same server. DDoS protection services can block all UDP traffic in case of strong attacks, and clients cannot access the name server - the site will be unavailable by domain name. In this case, DNS should be located on a separate server.

Pros:

  • Independence from third party resources
  • Ability to configure DNS for yourself and use your own scripts
  • For free

Minuses:

  • Requires 2 IP addresses
  • Difficulty setting up
  • Self-service support
  • Possible problems when using DDoS protection

Registrars require that each domain have at least two name servers: a primary (master) and at least one secondary (slave). The addresses must be two different IP addresses.

To satisfy this requirement, an additional IP address is connected to the server. The primary address is designated as the primary NS, and the secondary address is designated as the secondary NS.

Free DNS hosting

On the Internet you can find many resources offering free DNS servers.

Free DNS hosting is a good solution if you are unable to administer the DNS server yourself. But be careful: free services often include a disclaimer of liability. There may be restrictions on the number of domains and the number of requests per month. Posting commercial projects may be prohibited. Study the terms and conditions of the chosen service well.

Pros:

  • For free
  • The ability to find a service that suits the conditions and capabilities

Minuses:

  • Not responsible for performance
  • API is missing or difficult to use
  • Resource Limits

Paid DNS hosting

Paid DNS hosting, unlike free one, guarantees a level of service and provides a set of additional features. This DNS hosting is positioned as fault-tolerant and highly available. It has the transfer of existing settings from other servers and a full-fledged API for which many ready-made recipes have been written.

Pros:

  • fault tolerance
  • Full API
  • Additional functionality

Minuses:

  • Payable service

Why do you need an API on DNS hosting?

The most common application is to create a fault-tolerant system. For example, we have two servers. Server A is the main one, it hosts the site that visitors access. Server B is a backup server; it stores an up-to-date copy (replica) of the main site.

Let's imagine that we rent a paid DNS server. If the site is operating in normal mode, then the data is sent from server A. On server B there is a script running that checks the availability of the site to server A. If it stops working, then the script uses the API to access the DNS hosting and writes the IP-record to the A record. server B address. The site continues to work from the backup server.

Since the switching occurs with minimal delay, visitors will not notice the switch.

CDN proxy

CDN proxies (Content Distribution Network) stand out, which can also be used as DNS. CDN proxies speed up website performance by caching data on a distributed network of servers. The site is served to the client from the server closest to him. CDN can also filter malicious requests (protect the site from DDoS).

CDN networks have a serious drawback: the IP address for domains hosted in the CDN is assigned randomly. Those. it will be impossible to access the site or server directly using the IP address.

In addition, the site may be blocked in the Russian Federation. IP addresses of sites with prohibited content are blacklisted by Roskomnadzor and blocked by providers (and this is not uncommon for CDN networks). If your domain accidentally gets one of these addresses, the site will be unavailable. For this reason, it is necessary to carefully select a CDN provider and learn in advance about IP addresses that are on blacklists and possible problems with them.

Pros:

  • Increasing the speed of content delivery
  • Protection against malicious requests
  • Ease of use
  • fault tolerance

Minuses:

  • IP addresses may be blacklisted by Roskomnadzor
  • Price






2024 gtavrl.ru.