How DNS Works in a Nutshell

An IP address can be matched to a domain name using the Domain Name System (DNS). A web server's internet address is not human-friendly; it consists of a long string of numbers and/or letters (e.g. a0d1:ff7b:91b2:2bb7:f974:3821:7556:f45b). Type your favorite website's IP address into your browser's address bar all the time would be painful and may cause you to give up using the Internet. The reason we use domain names in our web browser's address bar is because they're easier to remember.

Domain names are easier to read and understand for humans, but IP addresses are easier to understand for computer programs. An IP address is generated from a domain name that we give a computer program, such as a web browser. A series of steps involving specialized machines called name servers are required to resolve or fulfill requests for an IP address associated with a domain name. When domain name resolution is successful, the user only sees a website that has successfully loaded.

Information You Can Get on the Internet with DNS

What happens in the background? A domain name is resolved to the correct IP address by four different name servers when it is entered into your browser's address bar. The process will be illustrated using the domain wikipedia.org. Resolving Name Servers resolve IP addresses for wikipedia.org.

In order to get your IP address, your browser makes a request to the Resolving Name Server, which then handles all the requests to the other three name servers. This will allow your browser to load the website contents from the server located at the IP address once the IP address is finally determined. You can get your browser to use other publicly available Resolving Name Servers, such as those provided by Google, Cloudflare, or OpenDNS, besides your ISP's. Use only known Resolving Name Servers to avoid being sent to fake websites where you may have your browsing data harvested without your knowledge!

An initial request is sent to a Root Name Server by the Resolving Name Server. Root Name Servers are responsible for supplying the IP address of Top Level Domain (TLD) Name Servers to the Resolving Name Servers. Since wikipedia.org belongs to the .org TLD, the Root Name Server will send the IP address of the .org TLD server to the Resolving Name Server. It then sends a request to the TLD Name Server, which finds the IP address of the Authoritative Name Server associated with wikipedia.org, and sends that information back to the Resolving Name Server.

Next, the Resolving Name Server queries the Authoritative Name Server, the last name server in the process that holds the IP address associated with the wikipedia.org domain. As soon as the IP address is passed on to your web browser, it fetches data from the wikipedia.org domain's front page to display in your browser window. As a result of the DNS, humans do not have to memorize IP addresses in order to access content from web servers.