Skip to the article content

Behind the scenes of online networking: Understanding DNS

The domain name system (DNS) is a behind the scenes networking protocol that helps us connect to websites. Here’s how it works.

Visiting a website is as easy as typing the web address into a browser on a connected device.

While that user-friendly simplicity is straightforward, there’s some behind-the-scenes technical wizardry that must first occur to make that web connection happen.

Part of that unseen networking is related to the domain name system (DNS), which acts as a translation tool of sorts.

Let’s break down how DNS helps simplify the process of surfing the web.

A handy translator

A contemporary analogy for understanding DNS might be that it’s like your saved contact list on your mobile phone.

When you call a person whose number you’ve saved on your phone, you find their name, rather than manually dialling their phone number.

DNS is like the bridge between name and number in your phone contacts. It is its own database network that stores all the relevant information for translating domain names to IP addresses.

For instance, when you visit the nbn™ website, you might type the web address into a browser.

What happens behind the scenes, though, is that web address is translated to the corresponding internet protocol (IP) address for the nbn™ website, which is a series of numbers.

If you wanted, and if you had it handy, you could also reach the nbn™ website by typing its IP address into a web browser, but that’s not as easy as remembering the domain name.

A translation between web domain to IP address needs to happen because of the difference between human-readable alphabetical language and machine-readable numerical language.

In short, connected devices and the online servers they communicate with don’t actually understand alphabetical domain names. We need a translator between human and machine.

Connected devices communicate in numbers (one example of which is IP addresses), but it’s easier for us human folk to remember alphabetical languages, which is why DNS invisibly facilitates the conversion process.

Returning to our analogy, without a mobile phone contact list we’d all be forced to remember (or separately store) phone numbers for our contacts.

Without DNS, we’d all have to use, remember and find numerical IP addresses for websites instead of just web addresses.

The DNS process

There are several key processes that happen when typing a web address in a browser to facilitate a connection between your connected device and the server hosting the website you’re trying to visit.

The first place your browser checks for DNS-to-IP-address translation is the device you’re using.

Websites you regularly visit are stored in your device’s cached data, which improves connection speeds because it skips the following steps.

If the translation data can’t be found, your device sends out a ‘DNS query’ for the web address.

This DNS query goes to your retail service provider’s recursive DNS servers.

These recursive DNS servers have their own local caches for finding alphabetical-to-numerical translation data.

If the translation data can’t be found, the recursive DNS servers forward a request to root nameservers.

The root nameserver analyses the DNS query from right to left, because each top-level domain (TLD) nameserver has its own server for the different kinds of online addresses (.com, .org, .au, etc.).

These nameservers don’t actually house the DNS translation, but they point the request in the right direction.

Continuing to scan from right to left, the TLD nameserver redirects the query to the specific nameserver that’s responsible for the web domain you want to visit.

The correct nameserver holds the translation info in its DNS records, and the correct record is retrieved.

This DNS record is then sent back to your retail service provider’s recursive DNS server and stored in its local cache.

The newly stored translation information has an expiry date, which prompts the recursive DNS server to periodically request a new copy of the record to ensure that its data is up to date.

From here, the recursive DNS server delivers the correct translation information to your device, where it’s recorded in the device’s local cache, before passing the information on to your web browser so the webpage loads.

All of this happens between hitting enter and seeing the page you’re after.

This process may seem complicated, but it usually only takes a matter of milliseconds to complete, even if a request must take the full path to and from the corresponding nameserver to resolve a DNS query. 

DNS assignment

DNS server details will usually automatically default to those of your retail service provider for your connected devices on a local internet connection.

Like the DNS process of translating alphabetical web domains to numerical IP addresses, this tends to be invisible.

A router (or a modem/router) is likely storing DNS server information for all of your locally connected devices.

You are able to manually change your DNS servers to alternatives such as Google Public DNS or OpenDNS on specific devices or at a modem/router level, but depending on the physical distance of these DNS servers to your home connection (in contrast to your retail service provider’s DNS servers), it may negatively impact your overall internet speed.

DNS works invisibly because we, as users, ultimately don’t need to know the computing language that connected devices use, as long as everything is working properly and the translation tools are correctly converting alphabetical requests into numerical forms that they do understand.

Essentially, DNS is your own personal human-to-machine translator, the goal of which is to work so flawlessly behind the scenes that you never even notice it’s there.

DNS isn’t the only unsung hero working behind the scenes. Find out how NAT helps your home network connect to the outside world, and why we even need it in the first place.

You might also like