What is DNS? What are nameservers? What is their role in my domain name and website?

What is DNS? What are nameservers? What is their role in my domain name and website?

A friend recently asked me why they needed so many different accounts for managing their domain name and website. After a quick look, their domain name was registered from one company, the site was hosted somewhere else, the nameservers were pointed somewhere else entirely and the DNS was all over the place. I think that came to be this way because of different people being involved in the process over many years. When a change was required, he had to hunt down the different companies and logins to do it.

I tried to explain the difference between the different services involved in maintaining a domain name and website. I hope this explanation below helps you too understand how the different pieces of the puzzle come together to get a website from domain name to live. Hopefully, by the time you read this, you know exactly where to look to, for example, point the website to a different server, move the nameservers somewhere else or alter your DNS zone to add new services (such as email).

First, you need a domain name

First, you need to buy the domain name. In my case, the domain name is graphicious.co.uk. You buy it from ICANN through one of their authorised resellers (ie. registrars). In your case, you may have bought it through a registrar such as GoDaddy, Hostgator, 123-Reg or whatever. There are thousands of these. You can find out where your domain was registered, if you don't remember, through your WhoIs record.

Second, you need a server to host your website

You need to get a SERVER to put the actual website on it. This largely depends on the way your website is built (or the way you are planning to build it). You may want to build your website using Wordpress. In that case, the server needs to support the technology required to run Wordpress sites. Other types of website platforms may need different server setups. My site, for example runs on a Windows server, and was built on .NET technology. So this is the main factor that influences your decision. If your site is built by someone else, they will likely have a favourite hosting company they like to work with and will tend to recommend them.

The bottom line is, the server is the final point - where your site lives: your files, images, pages, scripts, etc.

Now, the next two pieces of the puzzles basically help connect your DOMAIN to your SERVER. How does the internet know where the content for your website exists? Read on.

The DNS zone

In order to connect (or point) the domain NAME to the SITE SERVER, you need a DNS record. DNS stands for Domain Name Service.

When you install a site on a server somewhere (with your hosting company), the site exists on a machine somewhere in a data center, behind an IP address, for example: 186.155.23.26... just a random IP.

But you don't want to put THAT on your business card, do you? So in order to make the site accessible through a friendly (ie. domain) name, you need to map the domain to the IP address. Typically, you do this before you launch your website, part of your initial set up.

That's where the DNS comes in. It's like a phonebook, really. When you ask the question: "Where can I see the contents of graphicious.co.uk?", you ask this in of the DNS or 'the internet's phone book' as some people want to call it. And the DNS replies: graphicious.co.uk is on a machine at the address 186.155.23.26. And you are taken there by the browser. You don't even notice it.

The DNS records (also known as a DNS ZONE) also include things like 'where should I deliver EMAIL for the domain graphicious.co.uk' (the MX records), and other records to do with the domain name, subdomains, etc.

The Nameserver

All of these records from the DNS zone need to be STORED somewhere. These records don't exist in thin air, they need to be saved in what is called a 'NAMESERVER'. That's what hosts the DNS records. This is yet another computer with a database that keeps your DNS zone, makes sure it responds to questions from the various people and machines that try to access services on your domain: where is the website located? Where should I deliver your email? Requests for verification of domain ownership and many more, beyond the scope of this article.

So, to sum up:

DOMAIN (name) + HOSTING (files) + NAMESERVER (containing your DNS Zone) = Your site is LIVE.

All these things, in theory, can exist in different places, provided by different companies, which is what can make it hard to figure out what they are, where they are and who is in charge.

Now typically, the REGISTRAR offers NAMESERVER services also, but that is not always the case. Those that don't offer that, and just sell you the domain name, but require you to get your own nameserver... I guess they don't want to bother maintaining DNS servers, which are frequently under attack, they need to manage security, propagation of records, etc.

Most companies that offer these services for the general public tend to keep these aspects out of sight and manage them automatically. Since they offer them as a bundle, they offer the domain name AND the hosting, and then they manage everything in-between for you. I guess they've done a good job of NOT educating people.

As a customer, it's comfortable to buy the domain from someone that also takes care of hosting your 'DNS ZONE' for you. Many companies (Hostgator, GoDaddy and many many more), go a step further and give you website building and hosting services, all in one, so you don't have to worry about anything, just stay with them for everything. While this is good for beginners, it could come with strings attached.

I tend to use GoDaddy for my domain names. They offer domain name AND DNS hosting (included for free). But in other countries (Romania, where I'm from) for example, I had to get the domain from my national registrar and then figure out where to keep my DNS zone because they didn't offer that. So now there were three things to keep track of: my domain, my nameserver provider and my actual website - all on different platforms.

So this is where confusion might arise because you have your stuff spread across all these companies.

What I would recommend is you consolidate these into a single place if you can - or at least the domain name and nameserver. If all these different providers charge you for something, the amount can add up and you're getting invoices from all these different places.

I am guessing that you may be reading this article because you are confused or facing a situation where you don't know where to find your domain, hosting or make changes to your DNS. If you can, you should migrate to a registrar that offers everything in one place (domain AND DNS), then you won't have to worry where your stuff is, why you are getting invoices left, right and center, and when you need to manage/change something, you go to one place.

Well, I hope this article helps clarify at least the basic layout of a domain name and website. If you have any questions, I'd love to hear them in the comments below.

I can help

If you feel like this is way over your head, or you have been dumped by your web developer, I am happy to help. I've managed hundreds of websites and if we take it one step at a time, I'm sure we can figure it out. Why not contact me and I can help find out what's going on with your domain and help point you in the right direction.

Cristian

The guy behind Graphicious.co.uk, Cristi has been developing websites and applications for more than 18 years, has built his own CMS from the ground up (twice!) and is passionate about e-commerce, automation, graphic design, video editing, marketing and music.

Categories