Time To First Byte (TTFB)

The Time To First Byte (TTFB) metric determines how quickly the first byte of HTML code reaches the browser. It signifies the speed of the server and the network. Or simply put, the "time to first byte."

TTFB reflects the speed of the server (or infrastructure), the server-side application, and also the network speed between the server and the user’s browser.

supporting Web Vitals metric Time to First Byte TTFB metric. How’s your backend doing?

We recommend keeping the TTFB value as low as possible, ideally under 0.5 seconds on all page types, with Google recommending a value up to 0.8 seconds.

Why the TTFB Metric Matters

Impact on LCP Metric

TTFB directly affects the FCP and LCP metrics. If your TTFB metric exceeds 2.6 seconds, you cannot display the LCP element in less than 2.5 seconds, which is Google’s limit.

The display of LCP elements is the sum of backend speed (TTFB) and frontend speed (downloading and processing HTML, CSS, and JS files).

Backend + Frontend = LCP Backend speed (TTFB) + Frontend speed = LCP.

Impact on Crawl Budget

TTFB is also crucial for the crawl budget of search engines. The Crawl Budget dictates how many pages a search engine bot can crawl and index. This is particularly important for large websites.

If your server response is slow, the bot will crawl fewer pages.

Impact on Web Vitals and Thus SEO or PPC

Backend speed affects not only the speed of the pages themselves but also search rankings. Since it directly impacts the LCP metric and other Web Vitals, it helps the website achieve better ratings in SEO or PPC, as it influences the Quality Score.

How We Can Measure TTFB

Chrome Extension “Web Vitals”

With the extension directly in the browser, you can determine the TTFB value for individual pages of your site. In the console, you can find plenty of information on which parts of TTFB to focus on for potential optimization.

Web Vitals extension for Chrome browser Web Vitals Extension.

Read more about measuring speed directly in the browser.

User Data from Google (CrUX)

Using PageSpeed Insights, you can determine the TTFB metric for each URL separately or obtain data for the entire domain.

Monitoring with PageSpeed.ONE

In our monitoring PLUS, we not only show the current TTFB value for individual URLs or the entire domain but also illustrate with a graph how the metric has changed over time.

TTFB metric values can also be found in our tool TTFB metric in app.pagespeed.cz.

We have data from both users (CrUX) and synthetic measurements (synth). (See various types of web speed measurements.)

How to Optimize TTFB?

There are many ways to optimize the backend. It’s always necessary to start with data from measuring tools. Let’s explore a few of them.

Increase Your Server Performance or Opt for a More Powerful Web Hosting

Consult with your server administrator about upgrading memory, replacing processors, or swapping old disks for new SSDs on your server. Faster hardware will respond more quickly to user requests. Newer data storage technologies ensure faster database operations.

Set Up Server Cache Properly

Check your settings for caching database queries or template caching. Server cache can significantly reduce server load and improve load times by storing frequently requested content in the form of static versions, allowing the server to respond more quickly without the need for repeated query processing.

Optimize Database Queries

Identify which database queries take the longest to process and try to improve them. Developers should regularly review and optimize database queries and server settings to ensure maximum performance and code efficiency.

Move to a Cloud Solution

You can also improve the TTFB metric by migrating your infrastructure to some Cloud solutions and leave the entire operation to global players.

Keep Your Stack Updated

Remember to keep your development stack up to date. For example, update systems to the latest PHP versions, follow JS framework news, and utilize the latest practices offered by development platforms.

Optimizing TTFB and thus backend performance is the foundation you can build upon, even if you are optimizing WordPress, Shoptet, Drupal, or a website built on another CMS system.

Read our detailed article on how backend developers can help with speed.

Regular updates not only speed up server response but also prevent security threats and attacks on your infrastructure.

For more information on ways to speed up server response time, visit developers.google.com.