Web hosting providers connect your site to the internet and provide the server it runs on.
Domain name registrars reserve a domain name for use by your site.
What Is Web Hosting?
Web hosting provides a server (or part of a server) for a website’s files and database to be stored on. A server is just a powerful computer. Web hosting also provides the bandwidth that connects a site to the internet. Every computer that is connected to the Internet has an address — an IP number — that looks like this: “198.51.100.23”. It’s more or less like a phone number.
It wouldn't be convenient for everyone who wants to visit your website to type in an IP number. They’re hard to remember, they’re in limited supply, and “nexcess.net” is nicer to look at than “184.108.40.206”.
So, we have domain names: a name that is easy for humans to understand. When you type a domain name into your browser, a Domain Name Server converts it into the associated IP address so that the servers and the routers on the internet know where to send your request.
The domain names are managed by a set of organizations that are not connected directly to web hosting providers.
Domain Name Registrars
When you need a domain name to use with your site, you go to a domain name registrar. These companies (which are sometimes web hosting providers too) will, for a small fee, reserve a domain name for you to use for a limited time.
The registrars don’t actually own the domain name registry, which has ultimate control over the domain names under a top-level domain like “.com”, or “.net” but we needn’t concern ourselves with that wrinkle here.
So what exactly do you get when you pay a domain name registrar? In a nutshell, you get an entry in the name servers of the top-level domain. Those entries mean only you can use the domain name. The records also point to a Domain Name Server, a server that holds all the domain name records for your domain.
That sounds complex, but the domain name records are really just like the contacts app on your phone, which has a list of names associated with a list of numbers. To find a person’s number, you look up a name.
In simplified terms, when someone puts your domain name in their browser, the browser asks the name server of the root domain (the .com bit) where to find the Domain Name Servers for that domain. The root name server tells the browser where to find your DNS server, which is often part of your web hosting. The browser then goes to your name server, which tells it the IP address of your website.
In reality, it’s more complicated than that, with layers of caching and hierarchies of name servers, but hopefully, you now have a better understanding of what happens when someone uses your site’s domain name and how domain name registrars are different to web hosting companies like Nexcess.