Welcome to the DNS (Domain Name System) tutorial! In this lesson, we'll delve into the heart of the internet, exploring how DNS transforms human-friendly domain names into machine-readable IP addresses. Let's get started!
The Domain Name System (DNS) is the internet's telephone directory. It associates domain names like google.com with IP addresses like 172.217.10.74. This magical process makes navigating the web much easier for us humans!
A domain name is the unique address of a website on the internet. For example, example.com.
TLDs are the last part of a domain name, such as .com, .org, and .net.
Subdomains are created by adding a label before the TLD, such as www.example.com.
An IP address is a numerical label assigned to each device connected to a computer network that uses the internet.
DNS records are data stored in a DNS database that maps domain names to IP addresses. Here are some common DNS record types:
An A record maps a domain name to an IPv4 address.
An AAAA record maps a domain name to an IPv6 address.
An MX record specifies the mail server responsible for handling email for a domain.
A CNAME record creates an alias for a domain name.
When a user types a domain name into their browser, the DNS resolution process begins:
Let's explore a practical example using the domain name example.com.
# Query the IP address of example.com
nslookup example.com
# Output
Server: 8.8.8.8
Address: 8.8.8.8 8.8.4.4
Non-authoritative answer:
Name: example.com
Address: 172.217.10.74In this example, we're using Google's public DNS servers to query the IP address associated with example.com. The output shows that the IP address is 172.217.10.74.
What is the purpose of DNS?
What does an A record do?