A name server is a type of server that converts a text-based URL that is meaningful to human web users into an IP address that can be used to locate a resource over the Internet.
When you type a URL into a web browser toolbar and hit enter, the domain name portion of the URL must be converted into an IP address. The IP address is then used to locate the physical server where the website is hosted. The server that receives the URL in its text format and determines the IP address for the web server hosting the website is called a name server. This all happens as part of the Domain Name System (DNS) that underpins the operation of the web.
Frequently Asked Questions
Why can't a website be located by just a URL? Why do we even need IP addresses?
IP addresses are used to identify devices connected to the Internet. URLs are used to locate specific resources which are made available by a specific device, typically a web server. A name server ties the two together: the URL which identifies the resource, and the IP address which identifies the physical device where the resource is located.
Think of a name server as an index of domain names and IP addresses. Each domain name corresponds to a single website, and each IP address corresponds to a single networked device, such as a web server. When a name server receives a URL, it takes the domain name portion of the URL, compares it to its index, and returns the IP address where the website can be found.
It's helpful to think of the relationship between domain names, name servers, and web servers with a more human analogy. Imagine that you are trying to locate a specific person, and all you have to go on is their name. First, you would need to find a directory that could give you a street address where the person could be located. Once you had the street address, you could travel to that address, knock on the front door, and ask for the person by name. Simply shouting the person's name would do you no good. You have to use their name to locate their address.
In this example, the person's name corresponds to a website domain name, the directory corresponds to a name server, and the street address corresponds to an IP address. In order to locate a person (website), you must first locate their street address (IP address) by looking in an appropriate directory (name server).
What's the difference between IPv4 and IPv6?
When the Internet was first launched as a commercial enterprise it was hard to imagine that there would ever be a need for more than 4 billion IP addresses. At the time, IP addresses were formatted in such a way that approximately 4.3 billion addresses could be created. This forumation is called IPv4. However, beginning in the late 1980s, as the Internet began to experience explosive growth, it started to become evident that there would be a time when additional IP addresses would be necessary.