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 220.127.116.11.
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?
- DNS Propagation
- DNS Configuration – How to Set up Your Domain
- Free DNS vs Premium DNS
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 nameservers 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.
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 nameservers are specified.
Most registrars include basic DNS service with the cost of domain registration. As a result, unless you add custom nameservers to the domain, the domain will use the registrar’s standard nameservers. This means that in the vast majority of cases, by default, DNS records are managed by the registrar.
Nameservers 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 nameservers 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:
- Your domain (example.com) is registered at GoDaddy.
- You add Cloudflare’s nameservers to example.com within your GoDaddy account to start using Cloudflare.
- You change a DNS record for example.com at GoDaddy. This change will not do anything because the domain is not using GoDaddy’s nameservers.
- You make the same DNS change for example.com at Cloudflare. This change will be effective because the domain is using Cloudflare’s nameservers.
So in other words, if you are only using GoDaddy, you will need to update your DNS records with GoDaddy as they control your nameservers. If you are using Cloudflare, you will need to update your DNS records with Cloudflare as they control your nameservers. The same goes for those using Kinsta DNS.
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.
In our case, the web service is website hosting. An A record (or AAAA record) must be added to a domain’s nameservers 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.
When you make a change to the DNS of a given domain – such as updating a DNS record or switching nameservers – 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 time-to-live (TTL) 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 nameservers, the registrar determines the TTL value and it generally cannot be changed. This means that when you switch to new nameservers 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 nameservers to your host’s name servers via your domain name registrar. These are a minimum of two separate URLs that look something like this (you can have more than two URLs, just not fewer):
At Kinsta, we partnered with Amazon Route 53 to offer premium name servers to our customers at no extra cost. These nameservers are four separate URLs that look something like this:
Even if you use the included premium Amazon Route 53 DNS, you’ll still need to set up an A record and CNAME record to use your domain with Kinsta.
Beyond simply changing your domain servers, another option is to actually edit your domain’s A Record at your domain registrar. The A Record is what actually contains the IP of your server and directs traffic to the right spot.
For detailed guides on how to configure both methods, please see our article on how to point your domain name to Kinsta.
We also have tutorials on how to add an A Record at:
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.
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:
- The domain must be registered with a domain registrar.
- Nameservers must be specified by the domain registrar.
- DNS records must be added to the nameservers specified by the domain registrar or third-party service such as Cloudflare.
- The DNS records must be fully propagated to associate the domain with each relevant web service.
If you enjoyed this tutorial, then you’ll love our support. All Kinsta’s hosting plans include 24/7 support from our veteran WordPress developers and engineers. Chat with the same team that backs our Fortune 500 clients. Check out our plans