DNS, short for Domain Name System, is one of the most common yet misunderstood components of the web landscape. To put it simply, DNS helps direct traffic on the Internet by connecting domain names with actual web servers. Essentially, it takes a human-friendly request – a domain name like kinsta.com – and translates it into a computer-friendly server IP address – like 216.3.128.12.

Because DNS is all about looking up addresses and connecting devices, many people call DNS the “phonebook of the Internet”. Without DNS, you’d have to memorize every site’s IP address to access it which… well, that just wouldn’t work!

How Does DNS Work?

When a user enters a URL in their web browser, DNS gets to work to connect that URL to the IP address of the actual server. This is called DNS name resolution and involves a DNS recursor querying various name servers to figure out the actual IP address of a server.

DNS is primarily concerned with four components:

Let’s talk about these four components and how they work together.

Domain Registrar

A domain registrar is the service provider where domain names are purchased and where domain registration is maintained (such as GoDaddy or Namecheap). Kinsta does not offer domain registration but here is our list of the best domain registrars.

The registrar is where the domain name servers are specified.

Most registrars include basic DNS service with the cost of domain registration. As a result, unless you add custom name servers to the domain, the domain will use the registrar’s standard name servers. This means that in the vast majority of cases, by default, DNS records are managed by the registrar.

Name Servers

Name servers are servers much like web servers. However, they are configured to store DNS records rather than to serve up websites or web applications.

This means that when you want to change any DNS record you must change those DNS records on the name servers that have been specified by the registrar or third-party service such as Cloudflare.

This step is often a little confusing, so let’s break this down a little bit by looking at a fictional example:

  1. Your domain (example.com) is registered at GoDaddy.
  2. You add Cloudflare’s names ervers to example.com within your GoDaddy account to start using Cloudflare.
  3. You change a DNS record for example.com at GoDaddy. This change will not do anything because the domain is not using GoDaddy’s name servers.
  4. You make the same DNS change for example.com at Cloudflare. This change will be effective because the domain is using Cloudflare’s name servers.

So in other words, if you are only using GoDaddy, you will need to update your DNS records with GoDaddy as they control your name servers. If you are using Cloudflare, you will need to update your DNS records with Cloudflare as they control your name servers. The same goes for those using Kinsta DNS.

You can’t visit a website without first accessing a Domain Name server. In the process, you might be met with a message such as “DNS server not responding”, which basically means that the decentralized naming systems responsible for turning hostnames into IP addresses failed to respond.

DNS Records

DNS records associate a domain with a web-based service.

There are several different types of DNS records, but in most cases, only 4 or 5 types of DNS records are used:

  • A records: Used to point a domain or a subdomain at an IPv4 address. This is the rule used to point a domain like example.com to the web server where the example.com website lives. (Note: If a web server uses and IPv6 address rather than an IPv4 address, then an AAAA record is used rather than an A record).
  • CNAME records: Used to associate a subdomain to the primary or canonical domain. This type of rule is commonly used to associate a www subdomain with the primary domain, such as www.example.com with example.com.
  • MX records: Used to associate a domain with an email service. This is the type of rule used if you want mail for example.com to be delivered to a specific email service such as Gmail.
  • TXT records: Used to associate any arbitrary text to a domain. Most commonly, TXT records are used to associate SPF records with a domain to improve email deliverability and protect against spammers misusing the domain name when sending out spam. Check out our in-depth blog post on email authentication and why it’s important.
Screenshot: Adding an A record in Kinsta's DNS.
Adding an A record in Kinsta’s DNS.

Other types of DNS records that are less common include:

  • CERT records: Provides a space in the DNS for certificates and related certificate revocation lists (CRLs).
  • NAPTR records: This stands for “Naming Authority Pointer.” It is a type of DNS record that maps domain names to URIs and other records.
  • PTR records:  “Pointer records” are used for the Reverse DNS lookup.

Web Services

In our case, the web service is website hosting. An A record (or AAAA record) must be added to a domain’s name servers to associate that domain with the web servers that host the website.

There are many other types of web services that are associated with a domain through DNS records: email, SFTP, hosting control panels, webmail applications, and phpMyAdmin just to name a few.

DNS Propagation

When you make a change to the DNS of a given domain – such as updating a DNS record or switching name servers — those changes take some time to take effect. This time is called propagation.

Propagation varies considerably from one situation to the next.

In the case of DNS records, each record has an associated TTL (Time to Live) value. This value determines how quickly changes to DNS records will take effect.

In most cases, TTL for DNS records is set to 1 or 4 hours by default. This means that most of the time DNS changes will take as much as 4 hours to take effect. Higher TTL values are also possible and will mean that when a DNS record is updated that it will take more time before the changes take full effect. In some extreme cases, some might have TTL values as high as one week.

In the case of name servers, the registrar determines the TTL value and it generally cannot be changed. This means that when you switch to new name servers it can take from a few minutes up to a day or longer for those changes to take effect.

The hosting provider (Kinsta) cannot speed up DNS propagation. What you can do is reduce TTL well in advance of making any changes to DNS records so that the changes propagate as quickly as possible. You can use an online tool like whatsmydns.net to test to see if your DNS changes have finished propagating.

DNS Configuration – How to Set up Your Domain

There are two ways that you’ll commonly set up your DNS. Kinsta supports both methods, and you can pick whichever method you prefer.

One method is to simply point your domain’s name servers to your host’s name servers via your domain name registrar. These are a minimum of two separate domains that look something like this (you can have more than two name servers, just not fewer):

  • ns1.yourhost.com
  • ns2.yourhost.com

At Kinsta, we partnered with Amazon Route 53 to offer premium name servers to our customers at no extra cost. These are four separate name servers that look something like this:

  • ns-xxx.awsdns-60.net
  • ns-xxxx.awsdns-27.org
Screenshot: Kinsta's DNS name servers in MyKinsta.
Kinsta’s Amazon Route 53 name servers in MyKinsta.

Whether you use Kinsta’s free premium DNS or that of a third party, you’ll need to set up the records that point your primary domain and any additional domains at your site.

If your site is hosted with us, you’ll want to read our guide to adding a domain to a site on Kinsta, which also covers various permutations of our platform’s integration with Cloudflare.

For more detailed information on updating DNS at some popular registrars and DNS managers, check out these articles:

Free DNS vs Premium DNS

You can find both free DNS and premium DNS. All Kinsta customers get access to premium DNS via Amazon Route 53. And in general, we believe that premium DNS is a necessity in today’s world.

One big reason for choosing premium DNS is speed and reliability. Looking up DNS records and directing traffic takes time, even if it’s just a matter of milliseconds.

Typically, the free DNS that you’ll get from your domain name registrar is comparatively slow, whereas premium DNS often offers better performance.

Additionally, premium DNS can offer better security and availability, especially when you’re under a DDoS attack.

For a good middle-ground between the free DNS provided by your domain registrar and premium DNS, Cloudflare DNS is a free service that still offers many of the benefits of premium DNS. Just be aware: if you use Cloudflare DNS, you won’t be able to use the included premium DNS from Amazon Route 53.

Summary

Hopefully, you understand a little more now about how DNS works. To recap, DNS is used to associate web-based services, such as website hosting and email, with a domain name. This involves four steps:

  1. The domain must be registered with a domain registrar.
  2. Name servers must be specified by the domain registrar.
  3. DNS records must be added to the name servers specified by the domain registrar or third-party service such as Cloudflare.
  4. The DNS records must be fully propagated to associate the domain with each relevant web service.