TTFB. You may have seen this acronym before, but what exactly does it mean? Should you try to reduce it? And if yes, why is it important to reduce TTFB?
To cut to the chase: TTFB stands for Time to First Byte. The TTFB test is a measure of how long it takes for the first byte to travel from your web server to a visitor’s web browser.
In other words, when someone visits your website, the TTFB is how long they have to wait for the first tiny piece of information to be sent to their device.
In this post, we’ll evaluate the concept of TTFB and why you should care about it. Then, we’ll talk about how you can accurately measure TTFB.
Finally, we’ll show you 12 different things you can do to reduce your waiting time (TTFB) and server response time.
Let’s get started!
What Is TTFB?
As we mentioned in the introduction, TTFB stands for Time to First Byte. In essence, TFFB is just the amount of time until the first byte travels from the web server to the visitor’s web browser.
The greater this amount of waiting time, the longer it will take for your page to load. And no one likes slow websites!
What’s a byte? A byte is a unit of digital information that is made up of 8 bits. We won’t delve into the fine details of computing in this post, we’ll just cover the basics.
Bits are the most simple form of information in computing and digital information. The diagram below shows more detailed information:
When computers were first developed, a single character of text required 8 bits to encode. To make things easier, the term byte was created to refer to this 8-bit unit. So, to review, a byte is the smallest unit that can be modified in many computer architectures.
TTFB is just the amount of time for the first byte from your web server reaches your visitor’s browser. The longer this byte takes to travel, the worse your TTFB score.
However, you should know that your website’s speed is not the same thing as TTFB. It is primarily a measure of how responsive, or accessible, your server is.
To repeat that, TTFB measures how responsive your server is, not the speed of your website.
How important is TTFB?
In any case, it doesn’t hurt to try and improve it as you really have nothing to lose.
There are a ton of different tools for doing a Time to First Byte test. For this reason, the results you get can vary slightly. If you have the time, run tests with multiple tools to get a variety of results. If you get a slow TTFB result for one test, try running another one with a different tool.
They all more-or-less work the same way. Just type in your domain and press go. You’ll get different information for each one, but you’re looking for the big milliseconds number.
A millisecond is one 1/1000 of a second, so a score of 30 ms means that it takes 30/1000 of a second for the first byte to be sent from the server to the browser.
Hello! My name is Sujay and I’m CEO of Astra.
We’re on a mission to help small businesses grow online with affordable software products and the education you need to succeed.
If your score is below 100ms, you’re golden. Even a score between 200ms and 500ms is still good. You really only need to worry if you’re over 600ms.
Now let’s look at the different tools you can use. These are all completely free and do not require any signup or payment.
Pingdom’s TTFB test is useful in that it lets you choose the geographic location. If your visitors come from various parts of the world, this is a good way to test TTFB from different countries.
After running the test, scroll down to see your results. You’ll also see a list of suggested improvements, like avoiding URL redirects or by using Gzip.
GTmetrix has a website speed test that gives you a ton of data on different metrics. One of these is TTFB.
To run the test, type in your domain and then press Analyze. Once the test runs, scroll down to see your results. The TTFB score will be on the left side, under the Summary tab:
KeyCDN has a useful tool that lets you run a TTFB test from multiple geographic locations at the same time. These locations include cities in Europe, the United States, India, Southeast Asia, East Asia, and Australia.
This tool by Catchpoint gives you speed results for different metrics.
To run the test, type in your domain, choose your location and browser type, then click Start Test.
Your result will be the first item listed from the left hand side, titled First Byte.
Note that this test gives results in seconds, not milliseconds. To convert the number, multiply it by 1,000 or just type X seconds to milliseconds into Google.
Now we have milliseconds!
Geekflare has a very simple and easy-to-use tool that measures your Time to First Byte. Just type in your domain and press the orange button. You’ll get an accurate result in a matter of seconds.
When you get the results, you’ll see 3 numbers, one from your closest location and two from other cities around the world. Depending on the location of your visitors, you will want to investigate the most relevant one.
Google’s Chrome browser has a built in suite of tools called DevTools. With DevTools, you can view pages and make modifications to them immediately. One tool lets you view the TTFB speed of the web page you’re currently on.
Note that running this test from your own network isn’t a great idea as your own Internet connection speed will affect the score. In general, you should try to use one of the other tools listed above.
To test TTFB with Chrome Dev Tools, go to your website and right click on the page. Select Inspect.
Then, click on the Network tab. Wait a moment and you’ll see data start coming in. It can often take up to a minute, so be patient.
If you hover over the number under Time, you’ll see more details pop up. Your TTFB is the number after Explanation.
In our example, it is 333.54 ms, which is at the bottom. 334.54 isn’t a slow TTFB score, but it could probably be better.
As we mentioned above, this number will likely be higher than the results from other tools as your own internet connection is factoring into the score.
You should still run a test with one of the other tools to get an accurate result.
How to Reduce Server Response Times
Is your TTFB slow? Let’s talk about how to reduce server response times.
There are a ton of different things you can do to improve TTFB and make your server response time faster.
One of the easiest ways to lower your Time to First Byte score is to use a high-quality, fast WordPress host.
The system administrators at top web hosting providers are experts at making your site run as quickly as possible, so be sure to utilize their expertise.
Choosing a web hosting provider can be a confusing and complex process, so be sure to find one that matches your needs.
A Content Delivery Network (CDN) is a service that stores cached versions of your website’s static content in different locations around the world. These locations are called Points-of-Presence (PoP). CDNs are very useful because they speed up your website.
The static content includes code (HTML, CSS), images, and other similar items. When a visitor navigates to your website, a CDN automatically sends them the cached version of your site that is closest to them geographically.
For example, if your web host is based in Canada and a visitor from the Czech Republic visits your website, a CDN will load a cache from its closest PoP – likely somewhere in Central Europe.
CDNs reduce your TTFB by making it easier and faster to send content to the visitor’s browser. We always recommend using a CDN, if possible.
Caching is an easy way to improve your website’s loading times. By using a caching plugin, you can reduce both your page loading time and your TTFB.
Thankfully, it’s super easy to use a caching plugin in WordPress and setting one up only takes a few minutes.
4. DNS Provider
DNS does play a role in determining your TTFB rating, however, it can be difficult to quantify exactly. Nonetheless, using a premium DNS provider can definitely help improve your score, as it improves your overall connection speed.
Premium DNS providers also come with other useful features. These include more security and protection against large-scale attacks, faster performance, and more.
GZIP compression is a type of compression and file format that makes your files smaller. If your files are smaller, your site will load more quickly.
Many web hosting companies enable GZIP compression by default, but you can also use a plugin like Enable Gzip Compress.
Many CDN and caching plugins also have options to enable GZIP compression.
If your database is filled with irrelevant and unnecessary data, it can slow down your server response time. Unnecessary items can sometimes clog up your database, whether they are from old and unused plugins, previous installations of WordPress, or other things that serve no purpose.
Luckily, it’s easy to fix your database and get it running smoothly again. You can either do it manually in cPanel or use a plugin like WP-Optimize or WP-Sweep.
7. Delete Unused Plugins and Themes
If you aren’t using a plugin or theme, it is generally a good practice to remove it. This frees up disk space and also reduces the amount of data your server needs to send to new visitors.
To delete a plugin, go to Plugins > Installed plugins on your WordPress sidebar.
Then, find an unused plugin and click the red Delete button.
It goes without saying, but you should almost always try to use the most recent stable version of PHP. Upgrading PHP can be a little tricky, but most hosts will do it for you.
Not using a recent version of PHP can make your site more vulnerable to hackers, slower (by keeping inefficient code), and cause a host of other issues.
8. Keep Everything Updated (Plugins, Themes, Etc.)
Likewise, for the plugins and themes that you do use, be sure to always keep them updated. You can quickly see if any plugins or themes require updates right in your dashboard, both at the top, in the menu bar, and on the left side, under Dashboard.
If you see a high number inside a red circle, it means you need to update your plugins and themes!
It’s really important to always keep your plugins and themes updated, not just to make your TTFB lower. It’s also critical for security reasons and can prevent hackers from taking advantage of exploits in old versions of plugins.
WordPress Heartbeat is an API that shows near-real time frontend updates. This includes plugin notifications, live edits to post, and other things that are mostly optional.
For a majority of websites, it’s probably safe to disable it, as you likely don’t use these features on a regular basis.
To disable WordPress Heartbeat, you’ll want to use a plugin like WP Rocket. Most caching plugins also have the ability to disable it.
Disabling it is as simple as unchecking a box.
When setting up your WordPress host, always be sure to pick a server location that is closest to where you anticipate most traffic coming from. While you may not know this at the beginning, you can probably make a reasonable guess.
If your website is written in English and aimed at an American audience, this location is most likely in the United States or Canada. If your blog is about expats in Southeast Asia, you should go with a server in Singapore, Bangkok, or a similar location.
Cloudflare has a product called Argo, which reroutes your traffic to maximize speed. Argo routes over 10 trillion global requests per month, detecting real-time congestion and managing it effectively across the most efficient paths.
On average, sites perform 30% better when using it.
Using Argo is an excellent way to reduce your TTFB. However, do be aware that using Cloudflare itself can often increase your TTFB as it has firewalls and other technologies that help protect your site.
When you visit a WordPress website, numerous database queries are performed to fetch your content. PHP code is also run to create the page itself, which needs to be recreated each time someone visits your site.
All of these actions take extra time to perform. Web pages that run these extra processes are called dynamic pages.
To cut down on this extra time, you can make your pages static. What are static pages? Instead of having to create the page each time someone visits, you can create it one time, then send this static page to all new visitors.
The page doesn’t change, hence it is static. This cuts down on the amount of data required, which improves your TTFB.
In WordPress, there are numerous plugins which can help make the pages on your site static. We recommend Simply Static. This plugin also has an added security benefit, in that it allows you to separate your WordPress installation from the static files presented on the public site.
This reduces the likelihood of getting hacked, having your password stolen, or being the target of a DDoS attack.
Now you should know what TTFB means! While the acronym does seem intimidating, the concept of Time to First Byte is actually pretty simple.
It’s just a measurement of how long the first byte takes to reach your browser. By reducing TTFB, the pages on your WordPress site will load more quickly, which should make you (and your visitors) happy!
If you used one (or many) of the 17 different methods we shared above, you should definitely see a marked improvement in your TTFB score.
How fast is your TTFB? What have you done to make it faster? Do you know any tips or tricks that we left out? Let us know in the comments!