What’s in a Name?: Domains and Domain Name Servers
Recently, I’ve been learning more about computer networking and part of that exploration has led me to learn more about domains and domain name servers. Computer networking is such a vast topic and being new to computer networking, I found myself confused with all the different terminology and concepts. I wanted to cover this topic because I think it’s especially useful if you ever wanted to set up your own domain name and all the infrastructure that goes along with it. Along the way, we’ll cover some tools that may also be useful.
So, first things first..
What is a domain name?
Computers work by routing you to a specific IP address (e.g.,
). As humans, this can be hard to remember, so we use domain names.
A domain name is the address of your website in plain english. In your browser, you can either type
. They mean the same thing.
A domain name is made up of the following parts: the sub-domain (
), the domain (
) and the the top level domain (
A note of clarification - a domain name is not the same as a url. For example, the url:
has the domain name
A helpful tool to find the IP address of a domain name is
. This tool can be used for debugging purposes if you’re setting up your own domain name.
You can double check that your domain has an IP address associated with it. Here’s a sample of the output:
$ ping www.8thlight.com PING d114sp4kkqch89.cloudfront.net (22.214.171.124): 56 data bytes bytes from 126.96.36.199: icmp_seq=0 ttl=246 time=27.143 ms bytes from 188.8.131.52: icmp_seq=1 ttl=246 time=21.353 ms
How does this relate to a Domain Name System?
Domain Name System (DNS) is the translation layer, storing the mapping of domain name to IP address. It’s a database that contains all the records of public addresses and their associated domain names. This translation layer is fairly complex, so I'm going to layout the basics below.
What is a DNS Server?
DNS software can be installed on servers, thus making them a DNS Server. This software allows for the lookup process to occur. You may have heard of the term Name Server (NS). These are servers that have DNS.
How does the lookup work?
The lookup process is actually a series of lookups. Here's a visual that describes what the lookup process
would look like for
When you make an http request to
it first hits the
name server. The
only has knowledge of the next part of the address, so it returns the IP address for -
NS has knowledge of
so it finally returns the IP address for that and your browser is directed
to that IP address.
To lookup the NS servers IP addresses for
we can use
$ nslookup 8thlight.com Server: 192.168.0.1 Address: 192.168.0.1#53 Non-authoritative answer: Name: 8thlight.com Address: 184.108.40.206 Name: 8thlight.com Address: 220.127.116.11 Name: 8thlight.com Address: 18.104.22.168 Name: 8thlight.com Address: 22.214.171.124
Keep in mind the IP address is different for
$ nslookup www.8thlight.com Server: 192.168.0.1 Address: 192.168.0.1#53 Non-authoritative answer: www.8thlight.com canonical name = d114sp4kkqch89.cloudfront.net. Name: d114sp4kkqch89.cloudfront.net Address: 126.96.36.199 Name: d114sp4kkqch89.cloudfront.net Address: 188.8.131.52 Name: d114sp4kkqch89.cloudfront.net Address: 184.108.40.206 Name: d114sp4kkqch89.cloudfront.net Address: 220.127.116.11
This is because the first
is to the name server where as the second
is to the website. The name
server will return the IP Address of the website
Typing an address into your browser is actually a complex process and it all happens so fast! DNS is actually something we use everyday without even knowing it. It is one of the many parts of the internet that allows us to access a website. DNS just grazes the surface of computer networking. For more topics on computer networking you may enjoy this book Computer Networking a Top Down Approach By Kurose and Ross