Menu

The Internet

The DNS Lookup Process

Before a browser can load a web page it needs to know the IP address of the web server holding that page, because computers find each other by number, not by name. You type a domain name such as www.harbourlight-museum.org.uk, so the name has to be swapped for an address first. That job belongs to DNS (the Domain Name Service), which is made up of many DNS servers.

Finding the address

  1. When you type a URL or click a link, the browser may first check its cache, a store of names and addresses it has looked up recently. If the name is there, it can get on with the request straight away.
  2. If the cache has no entry, the browser sends the domain name from the URL to a DNS server.
  3. The DNS server searches its own database for that domain name.
  4. If it finds the name, it returns the matching IP address to the browser or computer that asked.
  5. If the name is missing, that server forwards the query to a different DNS server, which searches its own database in the same way. This can continue through several servers.
  6. If no DNS server can find the name, an error is returned to the browser, so the page cannot be loaded.

A sequence between a browser, a DNS server and a web server: the browser checks its cache, sends the domain name to the DNS server, which searches its database and returns the IP address; then the browser requests the page from the web server, which sends the files back.

A DNS server does not store the website itself. It only keeps records pairing domain names with IP addresses; the pages live on a web server.

Once the address is known

With the IP address in hand, the browser asks the web server at that address for the page. The web server finds the requested page and sends the files back to the browser, which displays the page on your screen.

A phone contacts list shows the idea: you pick a person by name, such as 'Auntie Jo', and the phone looks up the number saved for that name, so you never need to remember the number. The domain name is like the contact name, the IP address is like the saved number, and the DNS server is like the contacts list that returns it.