Domain Name System
The Domain Name System (DNS) helps users find their way around the Internet. Every computer on the Internet has a unique address – just like a telephone number – which is a string of numbers. It's called its "IP address". DNS is an Internet service which translates domain names into IP addresses.
What are Domain Names?
www.rejetto.com is the permanent, human-readable name of the home of HFS. It is much easier to remember than 18.104.22.168.
The name www.rejetto.com actually has three parts:
Host name ("www")
Domain name ("rejetto")
Top-level domain name ("com")
There are several hundred top-level domain names, including COM, EDU, GOV, MIL, NET, ORG and INT, as well as unique two-letter combinations for every country.
'www' is the host name. It specifies the name of a specific machine (with a specific IP address) in a domain. A given domain can potentially contain millions of host names as long as they are all unique within that domain.
How DNS works
A set of servers called Domain Name Servers (DNS) maps these human-readable names to IP addresses. These servers are databases that map names to IP addresses, and they are distributed all over the Internet. Most individual companies, ISPs, and universities maintain small name servers to map host names to IP addresses.
Name servers do two things:
- Accept requests to convert domain names into IP addresses.
- Accept requests from other name servers to convert domain names into IP addresses.
When you type a URL into your browser, the browser's first step is to convert the domain name and host name into an IP address so that it can request a Web page from the machine at that IP address. The browser contacts its name server and requests, "convert a domain name to an IP address".
The name server may already know the IP address for www.rejetto.com. That would be the case if another request to resolve www.rejetto.com had come recently (name servers cache IP addresses to speed things up). In that case, the name server can return the IP address immediately.
If, however, the name server has to start from scratch:
It starts its search for an IP address by contacting one of the root name servers. The root server knows the IP address for all the name servers that handle the top-level domains.
Root server returns to your name server the IP address for a name server for the COM domain. Your name server then sends a query to the COM name server asking it if it knows the IP address for www.rejetto.com. The name server for the COM domain knows the IP addresses for the name servers handling the rejetto.com domain, so it returns those.
Your name server then contacts the name server for rejetto.com and asks if it knows the IP address for www.rejetto.com. It does, so it returns the IP address to your name server, which returns it to the browser, which can then contact the server for www.rejetto.com to get a Web page.
What is Root name server?
A root name server is a DNS server that answers requests for the root name space domain, and redirects requests for a particular top-level domain to that top-level-domains' nameservers. The root server knows the IP addresses of the name servers handling the several hundred top-level domains.
Every name server has a list of all of the known root servers. It contacts the first root server in the list, and if that doesn't work it contacts the next one in the list, and so on.