What Is DNS And How Does It Work?

Jul 3, 2019 | DNS

Estimated Reading Time:

Even if you’ve never heard of DNS before, you may be surprised to know that you actually use it every day.

DNS stands for Domain Name System. It’s the way your device finds the website or email recipient you’re looking for. If you ask your computer to bring up google.com in your web browser, it has no idea what that means. Instead, your computer converts that domain name into a format that computers can understand.

The following is a DNS lookup performed on a Linux-based computer:

$ dig +short google.com
216.58.199.46

We’ve just asked the computer to find out the IP address of google.com. Our computer now understands that google.com lives at the address 216.58.199.46.

But, how does this work? Who stores all of this information?

There is no central location for every single DNS record on the internet. It’s a world-wide network of DNS servers working together to convert human readable names into IP addresses.

What you may not know is there’s an invisible dot at the end of every web address. For example: ‘google.com.’

If you visit a web address with a dot on the end, it will still get you to the same place; why is this?

The dot refers to the DNS root. At the root of the Domain Name System, there are several root nameservers. These servers get the ball rolling to tell your computer where a website lives.

The DNS lookup process begins from the very right-hand side of the domain. As there is an invisible dot, it begins there first.

It’s also important to note that every device/computer has a DNS resolver responsible for making all of these DNS lookup requests. Your DNS resolver servers are usually automatically assigned and provided by your Internet Service Provider.

The general conversation between your computer and all relevant DNS servers would be as follows:

Computer: Hello DNS resolver, where can I find google.com?
DNS Resolver: Hmm, I’m unsure, I’ll ask the root nameservers.

DNS Resolver: Hello ‘root’ nameservers, where can I find google.com?
Root Nameservers: Ask the .com nameservers, those servers will know.

DNS Resolver: Hello .com nameservers, where can I find google.com?
.com Nameservers: Ask Google’s nameservers, those servers will know.

DNS Resolver: Hello Google nameservers, where can I find google.com?
Google Namservers: Ahh! That website resides at 216.58.199.46.

The DNS resolver will then pass the answer back to the computer that requested the DNS lookup.

To see this entire process, see below:

$ dig +trace google.com

; <<>> DiG 9.9.5-3ubuntu0.18-Ubuntu <<>> +trace google.com
;; global options: +cmd
.                       3538    IN      NS      d.root-servers.net.
.                       3538    IN      NS      e.root-servers.net.
.                       3538    IN      NS      f.root-servers.net.
.                       3538    IN      NS      g.root-servers.net.
.                       3538    IN      NS      h.root-servers.net.
.                       3538    IN      NS      i.root-servers.net.
.                       3538    IN      NS      j.root-servers.net.
.                       3538    IN      NS      k.root-servers.net.
.                       3538    IN      NS      l.root-servers.net.
.                       3538    IN      NS      m.root-servers.net.
.                       3538    IN      NS      a.root-servers.net.
.                       3538    IN      NS      b.root-servers.net.
.                       3538    IN      NS      c.root-servers.net.
;; Received 717 bytes from 192.168.1.1#53(192.168.1.1) in 184 ms

com.                    172800  IN      NS      m.gtld-servers.net.
com.                    172800  IN      NS      i.gtld-servers.net.
com.                    172800  IN      NS      h.gtld-servers.net.
com.                    172800  IN      NS      e.gtld-servers.net.
com.                    172800  IN      NS      j.gtld-servers.net.
com.                    172800  IN      NS      d.gtld-servers.net.
com.                    172800  IN      NS      l.gtld-servers.net.
com.                    172800  IN      NS      b.gtld-servers.net.
com.                    172800  IN      NS      a.gtld-servers.net.
com.                    172800  IN      NS      c.gtld-servers.net.
com.                    172800  IN      NS      g.gtld-servers.net.
com.                    172800  IN      NS      k.gtld-servers.net.
com.                    172800  IN      NS      f.gtld-servers.net.
;; Received 1170 bytes from 192.112.36.4#53(g.root-servers.net) in 329 ms

google.com.             172800  IN      NS      ns2.google.com.
google.com.             172800  IN      NS      ns1.google.com.
google.com.             172800  IN      NS      ns3.google.com.
google.com.             172800  IN      NS      ns4.google.com.
;; Received 772 bytes from 192.41.162.30#53(l.gtld-servers.net) in 317 ms

google.com.             300     IN      A       216.58.199.46
;; Received 55 bytes from 216.239.34.10#53(ns2.google.com) in 117 ms

The final nameservers that provide the exact location are typically referred to as Authoritative Nameservers.

As you can see, there are several steps in the process and each step is crucial to the whole DNS lookup process.

So if you’ve ever edited your DNS records in your web hosting control panel, you’re adjusting the DNS records at the Authoritative Nameserver level.

Does it perform this DNS lookup process every single time?

Not necessarily.

In order to speed up the DNS lookup process and alleviate pressure on the the Domain Name System, caching is used.

Caching will occur at various levels in the DNS lookup process, including but not limited to:

  • Your device/computer
  • Your router
  • A proxy server
  • Your Internet Providers DNS resolver servers

It is possible for the answer to a DNS lookup to be provided by one of these instead of performing the entire lookup starting at the root nameservers.

How long is DNS cached for?

Each DNS record has a TTL (Time To Live) value which can be adjusted by the domain owner/administrator.

You’ll notice some numbers in the DNS trace above, these are the TTL values.

You’ll find that Google’s Authoritative Nameservers are providing a TTL of 300 seconds for google.com. This means that if any caching occurs at any level, Google is requesting that this DNS record is only cached for 300 seconds before a brand new DNS lookup needs to happen when the next request is made.

So now you know what DNS is and how it works!

If you have any questions or require assistance with any DNS adjustments, please open a support ticket.

Frequently Asked Questions

Check below for a few of our most frequently asked questions.

What does "Managed" mean?

We understand you’re busy running and promoting your business.

You have your own set of skills and don’t need to get bogged down by complicated domain verification processes, DNS adjustments such as MX, SPF and DKIM records.

Managed means you have access to Australian-based support at Razz Hosting. Need a hand setting up your new email on your computer, we can set up a remote session to assist with this process.

Already have mailboxes and need to migrate your existing emails and folders? No problem, this is all taken care of as part of the Managed service.

What is Microsoft Exchange?

Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.

I already have an email address, can you migrate my existing email content?

Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.

What is the difference between Business Basic & Business Standard?

Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.

I've already got Microsoft 365 and want to move to Razz Hosting

You can certainly move to our Managed Microsoft 365 service whereby assist with managing your subscription. However, there are a couple of things to be aware of. Microsoft has a strict commitment policy and it very likely that no refund will be possible through your existing provider. You’ll want to check if you’re on a monthly or annual commitment and then reach out to us to make a plan.

Go to Web Hosting

Simple web hosting solutions, free managed migration service and honest advice. We don’t make it harder than it needs to be. Let’s supercharge your website!

Go to WordPress Care

Isn’t it about time you take the stress out of managing your WordPress website? Leave your WordPress updates, security and maintenance to us for peace of mind.