Domains, hosting, DNS servers and DNS records – .com

In this tutorial I talk about the differences between domains, hostings, DNS servers and DNS records, because it seems that sometimes there is a bit of confusion.

1. The domain

The first and easiest thing to understand is the domain. It is the name that our website has on the Internet. In this case ““. Although we talk about “buying”, in reality it is only rented. As a minimum of 1 year and a maximum of 10 years, we pay to have the domain during that time, and while we have it, only we can renew it.

Now, where do we “buy” it? Well, traditionally it used to be done in a domain company. But over time the hosting companies They also began to offer the sale of domains. And what’s more, domain companies began to offer hosting as well. Result? That there are practically no companies that only offer one of the two things.

So, the first thing will be to buy that domain. And once we have it, we move on to the next point. The hosting.

2. The hosting

The hosting is the hard drive where we are going to have our website: The files, the images, the database. Where will all this information be stored?

Yes effectively. Our website is on a computer’s hard drive. What happens is that it is a special computer with certain characteristics, called server. And that is offered by hosting companies: Shared server, virtual server, dedicated server… Does it ring a bell?

Although most companies offer both domains and hosting, it is not necessary to buy the domain from the same company that offers the hosting. Thus, we can buy our domain in a company, and the hosting in another. The only thing that we must take into account if we do it this way, is that we will have to “link” our domain to our hosting, configuring the so-called DNS. On the other hand, if we do everything in the same company, we can skip that step.

When we talk about DNS, we can refer to two very different things. The dns servers and the dns records.

See also  29. Paper therapy with Charuca

3. DNS servers

The DNS servers are in charge of telling the browser which server your website is on. that is, of connect the domain with the hostingto understand us.

So, if we have a domain purchased at “domains-pepe.com” and the hosting at “hostings-manolo.com”, we must go to the “domains-pepe.com” control panel and look for the section where it allows us to enter the “DNS Servers”. Each company has a different control panel, and sometimes it is a bit difficult to find it, but looking hard enough you will find it.

There we must put the DNS servers of our hosting company. These are usually a domain with a “nsx” subdomain. For example, CDmon has these:

  • ns1.cdmon.net
  • ns2.cdmon.net
  • ns3.cdmon.net

Or SiteGround, has these:

  • ns1.esm2.siteground.biz
  • ns2.esm2.siteground.biz

For example, if we have a domain in CDmon and we want to associate it with a hosting that we have in SiteGround, we must configure it like this:

As I said, this interface depends on each case, and will be different in each company. The important thing is to locate somewhere to put something called “DNS Servers”. Sometimes they will present it to you as “Main DNS and Secondary DNS”, or sometimes they will let you put more, as we see in the image.

Doing that we will have connected our domain with our hosting. Be careful because this process it is not immediate. Every time we change this data we start a progressive process that can take between 24 and 48 hours. It is what is called the dns propagation, and it depends on your Internet provider. Some take longer to “update” this data and some less.

As I have said before, if we have bought both things in the same company, normally all this is already configured and it is not necessary to do anything.

But there is still one more step. Although it is true that we have connected the domain with the hosting, now we must detail where the servers of each service (ftp, pop, imap, webmail, smtp, etc.) of our hosting are. That is done with the dns records.

See also  Layout course #7: Layout a magazine - .com

4. DNS records

We now come to the fourth and last point. DNS records. These are the ones in charge of distributing the different services of our domain.

Excuse me, how? Services? What services? Well, it turns out that not everything ends in hosting. A domain can have several associated services. These are configured through subdomains, and although there are many, the most common are usually these:

  • A-records
    • Primary domain pointing to the physical IP of a computer (server).
    • Optional subdomains that point to other folders on our website
    • Firewalls
  • CNAME records
    • To associate subdomains to other services and create aliases.
    • Comes from C.anonic Yam.
  • MX records
    • To associate our domain to a mail server (usually different from the server where we have the web).
    • Comes from mail Exchange.
  • TXT/SPF records
    • They have many uses, mainly for authentication.

To get an idea of ​​how this is set up, and how it looks in a control panel, here’s a look at CDmon’s DNS record manager:

We are not going to go into detail about each service, as this would already be a topic for another tutorial. (if you want it, tell me and I’ll do it)but as you can see, in the A-records We have the IP of the server where the web is hosted, in the CNAME records the “mail” subdomain that links to Google Apps, in the MX records we have configured the Gmail servers, and finally in the txt records we have an authentication for Webmaster Tools.

Important: If you look closely, the values ​​of the registers A, CNAME and MX (which can be both IPs and domains or subdomains), They do not have to be from the company from which we have bought the domain, nor the hosting. What do I mean? Well, we can be using a DNS record manager from a domain or hosting company, to “point” to another external one.

See also  Never use themes with CPTs - .com

For example, look at the values ​​of the MX. They all point to Google. Originally there were CDmon’s mail servers, which I deleted, to replace them with Gmail’s. In the same way that I have done that, I could change the IP of the record A for the web to point to another server (another hard drive) outside of CDmon, SiteGround, or DigitalOcean, it doesn’t matter. The important thing is that there is the web that we want to show.

Unlike the dns serversupdates and changes to the dns records they must not “spread” for 24/48 hours, as they must not reach all Internet providers. So, it is a matter of minutes.

Summary and conclusion

As a summary, here is a simplified scheme of how the theme works:

There are always these steps. Someone types a domain into a browser, your ISP looks to see which DNS server is on it, sends it there, and it directs the user to one IP or another, depending on the DNS records.

One last interesting point: If you have contracted the domain in a company (for example GoDaddy) and hosting in another (for example CDmon)you should be able to use either the DNS record manager from one or the other.

Even 3 players could get in on the action: Buy the domain in GoDaddythat it points to the dns server of CDmon, and that it points the dns record to a SiteGround IP. Come on, mess.

In case you have gotten lost during this article, or your cables have crossed with so many servers, records and IPs, in my you can see in an easy way how to buy a domain and assign a hosting step by step, in real time 🙂

Loading Facebook Comments ...
Loading Disqus Comments ...