I’ve been learning more about computer networking recently, 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.,
22.214.171.124). 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
126.96.36.199. They mean the same thing.
A domain name is made up of the following parts: the sub-domain (
www), the domain (
8thlight) and the top level domain (
A note of clarification—a domain name is not the same as a URL. For example, the URL:
https://www.8thlight.com has the domain name
A helpful tool to find the IP address of a domain name is
ping. 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 (188.8.131.52): 56 data bytes 64 bytes from 184.108.40.206: icmp_seq=0 ttl=246 time=27.143 ms 64 bytes from 220.127.116.11: icmp_seq=1 ttl=246 time=21.353 ms
Note - you may see a different IP address for
www.8thlight.com because there may be mulitple IP addresses that correspond to this website.
The primary purpose of this is to always have a fallback option if need be.
How does this relate to a Domain Name System?
Domain Name System (DNS) is the translation layer, storing the mapping of a domain name to an 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 lay out the basics below.
What is a DNS Server?
DNS software can be installed on a server, thus making it 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
www.drive.google.com, it first hits the
com name server. The
com name server
only has knowledge of the next part of the address, so it returns the IP address for—
NS has knowledge of
www.drive.google.com, so it finally returns the IP address for that, and your browser is directed
to that IP address.
To look up the NS server's IP addresses for
8thlight.com, we can use
$ nslookup 8thlight.com Server: 192.168.0.1 Address: 192.168.0.1#53 Non-authoritative answer: Name: 8thlight.com Address: 18.104.22.168 Name: 8thlight.com Address: 22.214.171.124 Name: 8thlight.com Address: 126.96.36.199 Name: 8thlight.com Address: 188.8.131.52
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: 184.108.40.206 Name: d114sp4kkqch89.cloudfront.net Address: 220.127.116.11 Name: d114sp4kkqch89.cloudfront.net Address: 18.104.22.168 Name: d114sp4kkqch89.cloudfront.net Address: 22.214.171.124
This is because the first
nslookup is to the name server, whereas the second
nslookup 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 every day 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 might enjoy the book Computer Networking: a Top-Down Approach by Kurose and Ross