Table of contents of the article:
As we have long argued, having a fast website is very important nowadays.
One of the fundamental aspects is to have a low Time to first Byte, let's see how it can be influenced and improved using fast DNS servers.
What is time to first byte?
In other words, it is the time that the browser has to wait from when the request is made until it receives the first byte of information from the server.
The operation may seem trivial, but it is not at all.
From the moment the user types the address in the search bar of his browser and presses enter, to the moment he receives the data, a number of extremely technical and complex operations are interposed which necessarily, once added together, make up the famous Time To First Byte, which is the time to receive the first byte.
These operations specifically and deliberately omitting all the part on the TCP / IP handshake, the speed negotiation, the SSL or TLS handshake to establish an HTTPS connection, various and possible (we don't want to give a lesson about networks in our blog) , the following can be briefly summarized.
- DNS resolution;
- Establishment of the connection;
- Sending the request;
- Waiting for the answer;
- Receiving the response.
Obviously, given the title of the post we will focus on the first point, or the DNS resolution.
DNS and TTFB resolution
On DNS resolution we have dedicated several articles like this one What is the DNS system of domain names? ,but we have not yet dealt with inherent aspects on the resolution speed to date and we want to do it with this article, also recommending the best nameservers to obtain an optimal TTFB.
DNS resolution - what is it?
Domain Name System Resolution is a process of translating a domain name into an IP address. A website can only be reached with an IP address, but since it's easier to remember a domain name, we need a way to translate one into another.
When you type a domain name into your browser (or click on a link that has one), your computer asks your ISP if it can translate it to an IP address, otherwise it asks other servers and so on until it gets a response. This process is called DNS resolution and happens every time you visit a new website or update the dns cache (usually after 24 hours).
Why is a low TTFB important?
You should know that more than half (57%) of users will leave your site if it takes more than 3 seconds to load *. That's why having a low TTFB is critical to making your visitors happy and increasing your conversion rate.
The most common mistake people make, when they want to improve the performance of their website, is to focus only on the frontend part (the one we see) but not on the backend part, which includes DNS and TTFB resolution.
Of course, a fast DNS resolution is not everything in life, maybe we have a very fast 10ms DNS resolution and then a very slow site that takes 10 seconds to open, but on a site that is already fast having a fast DNS resolution is part of a winning formula.
Let us remember that web performances are not a product, but a process, in constant revision and evolution.
Fast DNS is crucial for a fast website because it allows for faster resolution of your domain name to an IP address. This ensures that visitors who are trying to reach your website have a faster time to establish the path from their computer to yours.
Using the best authoritative nameservers is one of the easiest ways to ensure you have fast and reliable DNS.
If you want to deepen the understanding the TTFB we have written a dedicated article.
My Hosting Provider has its own DNS. Can I use those?
No. Your hosting provider can't do DNS. Just as we very humbly admit that we do not know how to do it either. Which is different from saying that we do not know how to install an instance of Bind or PowerDNS, but that we are certainly not able to compete with some of the world-class enterprises that we will see shortly and therefore we prefer to leave the DNS resolution to those who do it. he does excellently, because sufficiency and mediocrity do not fit into our way of reasoning, living, working.
In short. Unless your Hosting Provider is among those listed below, you should not use the nameservers of your Hosting Provider, especially if they run on your hosting space or on your dedicated server.
Having a fast DNS allows for a faster resolution and a lower and therefore better TTFB.
The goal is to decrease it as much as possible and make your website faster.
DNS is an important part of the internet infrastructure, but it's not something everyone pays attention to. Most people simply want their websites to load fast and be accessible to their visitors. To do this, you need a fast authoritative nameserver or DNS service.
The best DNS servers are based on your needs. For example, if you are looking for security, you may want to use one with DNSSEC support. If you have faster internet connections in different geographic regions, then you may want to use one with Anycast routing.
Here are some of the best authoritative DNS services
Based on DNSPerf.com ratings this is the list of the current fastest authoritative nameservers.
Among the list, CloudFlare's DNS stands out in fourth place with a response time of just 0,9 ms greater than the first one, which as we have already discussed in another article DDOS attacks and extortion of payments in Bitcoin? How to protect yourself with CloudFlare allows additional and interesting features and characteristics.
So if you want to improve the aspect of a fast DNS resolution as well, we recommend that you bring the DNS to CloudFlare bypassing those of your current provider.