DNS name resolution is the process of translating a fully qualified domain name into an IP address through a hierarchical chain of servers. Starting with the local hosts file, a query travels through root servers, top-level domain servers, and authoritative name servers until the correct IP address is returned.
DNS Name Resolution
As we mentioned last time, we talked about the different components of a domain name. For instance, this first part is the top level domain. We talked about the subdomains to that. We call this last part the host, which is the specific host or specific server that we're going to be addressing. And the rest of this is the domain part of that. So we've got the domain, and we call this full thing the fully qualified domain name, or the FQDN.
How do we translate this? What do we reference? We've talked many times about a server that we go and ask the server what is the translation. But there's a lot more to it than just that. So let's dial it back to the very basics, and that is there is a file on your machine called the host file that does exactly this. It translates names to IP addresses.
So we could actually open up that host file on that machine and then add an entry that says this is the host name and this is the IP address of that. And that is the first stop when you're doing name resolution: this machine is going to look at that host file to see if there's anything in that host file for translation.
So this would be a way to set up, like if you're testing something, it'd allow you to do some testing on it before you released it into the whole general populace, the public, until you made it go live. Or perhaps you have a reference that somehow you need to reference some sort of local resource and you want to do it by name. This is the file that you would use. So there's a few different use cases of why you would want to go into the host file, specify a name, and then the address that you want it translated to.
As mentioned, if your machine can't find the solution within the host file, that is it can't resolve the name that you typed in to an IP address from the host file, and most of the time it's not going to because most of the time we're not using the host file, then what it's going to do is go and look for the answer. Usually there's some sort of DNS server that's set up on your machine, and it's going to go and ask that DNS server, and then your DNS server is going to go through the process of trying to resolve the name for you and then send the information back.
So I've skipped that middle machine at this point in time, and we're just going to take a look at the process. So if we're trying to resolve www.techknowsurge.com, then what it first of all needs to do is go to the root server and look up, how do I find www.techknowsurge.com? And you're asking the root server this question.
The root server is a list of, you know, sometimes your machine has a list of root servers on it. Like if you're using a Linux machine there'll be a list of root servers on it, or if you're looking at a DNS server it'll have a list of root servers that it's going to go and query and ask this question to. And it's asking, who is www.techknowsurge.com?
And the root server then will reply back and say, I don't know who the www.techknowsurge.com is, I can't give you an IP address of that, but here's an IP address of who you should check with next. And it's going to be one of many different servers. So it's going to reply back with an IP address of many different dot servers. So that is the top level domain right here. So there is a lot of different servers out there that's going to facilitate your question of who is www.techknowsurge.com.
So you've gone out to the root server. The root server replies back with here's an IP address that you should check next. You go out to the top level domain server here, and that's the dot server. So you go out to this .com server and you say, who is techknowsurge.com? And this replies back and says, I don't have the answer that you're looking for, but here's an IP address of somebody you should check next. And it knows who is responsible for the techknowsurge domain, and it replies back with the IP address for that server.
And then you go out, you check. Okay, here is the, I'm looking for www.techknowsurge.com. And this level right here says, okay, let me take a look at my files, because I am responsible for techknowsurge.com. It looks for a record within its database, and it's looking for the www record. So it's looking for the www host, and then if that is an A record, it has an IP address and sends the IP address back to this machine. So this machine then can go reach out to that IP address and say, hey, I'm looking for the site www.techknowsurge.com.
So once again, the process: your machine asks who is www.techknowsurge.com. It gets responded back with, okay, here's an IP address. You go to that IP address, and for the com server, and it responds back and says, okay, here's an IP address, you go to this domain right here. This time it actually has the... And so when it replies back, it's going to reply back with an IP address.
But the question is, how does your machine know that it's the IP address that it's looking for? And the answer is it gives, this machine, this server right here gives an authoritative answer. There is a bit within the DNS response. It turns that authoritative bit on, which tells this machine you are now getting the IP address for www.techknowsurge.com.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →