New web hosting clients are often confused by the way the domain name system and the domain registration system work. More specifically, they’re confused that there is a difference between registering a domain name and actually linking it up with their site via a DNS hosting service.
I’d like to take a look at the three services that work together to ensure that when a user puts a web address into their browser, the appropriate web site appears. Those three services are web hosting, the domain registration system, and DNS, the Domain Name System.
TL;DR of Hosting vs. Registrar vs. DNS
Even when simplified, the explanation is complex, so here’s the nutshell version:
- Web hosting provides the server your site lives on and the bandwidth that connects it to the outside world. The server has an IP address that other machines on the internet can use to communicate with it, much like a phone number.
- A domain name registrar allows you to reserve a domain name for use with your site.
- The Domain Name Service(DNS) tells web browsers which IP address goes together with your domain name.
What is Web Hosting?
This is the easiest one to explain. When you pay for web hosting, you are buying space on a server in a data center with a connection to the Internet. Your site’s files are stored on the server, and that server — or the network interface it’s connected to — has an IP address. An IP address is a set of numbers that routers, switches, and other servers use to find a particular server from the millions that constitute the internet.
What Is A Domain Name?
When someone wants to visit your site, they don’t enter an IP address, they enter a human-readable domain name. Domain names look like this:
The “example” is your site’s domain, and the “.com” is a top-level domain. To be able to use a domain for your site, you have to register it with a domain name registrar. The names of sites on the web are handled by a set of organizations that manage registries — essentially big lists of who “owns” a particular domain. You don’t deal directly with registries; you deal with a registrar, which manages registration on behalf of the registries. That sounds confusing, but the details aren’t really important. You register a domain name, and you get control over the use of that name for period of time.
What Is The Domain Name System?
At this point, you have web hosting and you have a domain name you can use. But something is missing — how do you connect the domain name to the server on which your site is stored? Domain name registries don’t do this. It’s the job of the Domain Name Service (DNS).
When your domain name is entered into a browser, the browser asks a domain name server, probably your Internet Service Provider’s domain name server, if it knows which IP address is associated with that domain. If it knows, it will send that IP address to the browser. If it doesn’t know, it will ask a different DNS server for the information.
DNS servers are arranged in a hierarchy. At the top of hierarchy are the root name servers. These know where to find the domain name servers that have authoritative information for top-level domains like “.com”. The root name server tells the ISP’s server where to find the DNS server that has information about “.com” addresses, including “example.com”. The DNS server for “.com” knows where to find the name server for your domain name — that is, the domain name server that knows the IP address of your website. At this point, the ISP’s DNS server knows the IP address of your site, and can send it to your browser.
So, why do you need DNS hosting? Because that’s what provides the authoritative domain name servers that know the IP address of your site. When you link up your site with its domain name, you tell the domain registrar where to find the authoritative domain name server for your domain name and that information is propagated through the DNS hierarchy.
In reality, these three components might all be managed by the same company — most web hosting providers also offer domain name registration and DNS hosting, but the same is not true in reverse. Specialist domain name registrars like Hover don’t usually provide DNS hosting, which is why, when you register a domain, you must tell the registrar where it can find the authoritative domain name servers for that domain — in most cases, that will be your web hosting company’s domain name servers.