Back to basics
Before we jump into what a query is, let’s cover some basics real quick. DNS is the proverbial glue that holds the Internet together. The Internet is essentially a network of computers that connect to each other. In order for computers to find each other, they need a common language.
In the beginning, web surfers connected to other computers (or websites) using long series of numbers (IP addresses) to describe themselves. This became troublesome very quickly because no one could remember all those long numbers, so the early “fathers and mothers” of the Internet developed a system to attribute a domain name to each of these IP addresses, enter the Domain Name System, or DNS for short.
So what’s a DNS query?
Think back to the days where we didn’t have cell phones and had to use phone books to call people. DNS is basically the phone book of the Internet! It stores all the IP addresses (phone numbers) and domain names (people, places, and businesses).
Say you need a DNS provider, you’d ask yourself “what’s the phone number for DNS Made Easy?” in a nutshell that’s your query. In terms of DNS, your query is asking “what’s the IP address for dnsmadeeasy.com?” Simple right?
Now this is where it gets a little more complicated. The domain in question has to be a Fully Qualified Domain Name (FQDN), which is the properly formatted name for a domain. That means that the domain has both a hostname and a domain name. Let’s say we’re trying to reach DNS Made Easy mail servers, which are hypothetically located at mail.dnsmadeeasy.com
- The hostname would be: mail.
- The domain name: dnsmadeeasy.com
- The query would be: mail.dnsmadeeasy.com
- The response would be: 10.200.300.201
Let’s see this in action
Say we want to visit the DNS Made Easy blog which is found at: social.dnsmadeeasy.com. Using the domain name system, we’d lookup the record by breaking down the address piece by piece:
. First, we have to go all the way back to the root name servers. These servers are really special, because they hold all of the domain names and their corresponding IP addresses
.com Then we ask the COM top level domain (TLD) name servers that handle all the traffic for sites ending in .com
dnsmadeeasy.com From here, the .com name servers identify what name servers dnsmadeeasy.com is a responsible for
social.dnsmadeeasy.com Finally, the authoritative servers for dnsmadeeasy.com respond with the appropriate IP address for social.dnsmadeeasy.com
Now if we want to get even more specific, say we want to add a local computer to the internal authoritative DNS. We’re going to call this computer “SteveJob” and set up what is called a “hosts” file within the local name servers. Now other computers in the local network can find “SteveJob”. The problem is, computers can’t just find each other by typing in “SteveJob” instead you need a FQDN. So over the public Internet “SteveJob” would have to be referred to as “SteveJob.social.dnsmadeeasy.com”.
Once you’ve found the IP address for your domain, this little piece of information has to come back to your browser before you’re finally connected. That’s a lot of stuff going on in just a couple milliseconds. To put this in perspective, DNS Made Easy provides their clients with sub 30ms resolution times in all major markets. That’s less than half the time it takes to blink your eye.
The Big Picture
DNS is wonderfully predictable when it’s configured correctly, so no matter where you are in the world you’d be able to access SteveJob.social.dnsmadeeasy.com.
If you want to see this in action check out our video at Learn DNS