Time To First Byte (TTFB)
The Time To First Byte (TTFB) metric measures how quickly the first byte of HTML code reaches the browser. It reflects both server and network speed. In plain terms, it’s the time taken for the first byte to load.
TTFB displays the performance of the server (or infrastructure), the server-side of an application, and the network speed between the server and the user’s browser.
TTFB metric. How is your backend doing?
It's advisable to keep the TTFB value as low as possible, ideally under 0.5 seconds across 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 exceeds 2.6 seconds, you cannot display the LCP element in less than 2.5 seconds, which is the limit set by Google.
Displaying the LCP element involves the combined speed of the backend (TTFB) and the frontend (downloading and processing HTML, CSS, and JS files).
Backend speed (TTFB) + frontend speed = LCP.
Impact on Crawl Budget
TTFB is also significant for the crawl budget of search engines. The Crawl Budget dictates how many pages a search engine’s crawler can process and index, especially relevant for large websites.
A slow server response means the crawler can process fewer pages.
Impact on Web Vitals, SEO, and PPC
The speed of the backend affects not only page speed but also search ranking. Since it directly influences the LCP metric and other Web Vitals, it helps the site achieve better SEO rankings and can impact PPC as it affects the Quality Score.
How We Can Measure TTFB
Chrome Extension “Web Vitals”
Using the extension directly in your browser, you can determine the TTFB value for individual pages on your site. The console provides a wealth of information on which aspects of TTFB should be targeted for potential optimization.
Web Vitals Extension.
Read more about measuring speed directly in the browser.
Data from Google Users (CrUX)
Our website speed test or PageSpeed Insights tool allows you to find the TTFB metric value for each URL individually or obtain data for an entire domain. The distribution of specific TTFB values among users (including the typical double peak of cache vs. non-cache) is shown in a histogram.
Monitoring with PageSpeed.ONE
Our PLUS monitoring not only shows the current TTFB value for individual URLs or the entire domain, but also, through a graph, illustrates how the metric has changed over time.
TTFB metric in pagespeed.one.
We have data from both users (CrUX) and synthetic measurements (synth). (See various types of web speed measurements.)
How to Optimize TTFB
There are numerous ways to optimize the backend. It is always essential to base actions on data from measuring tools. Let’s highlight a few options.
Boost Your Server’s Performance or Opt for a More Powerful Web Hosting
Discuss with your server administrator the possibilities of upgrading memory, replacing processors, or swapping out old disks for new SSDs on your server. Faster hardware will respond to user requests more swiftly. Newer data storage technologies ensure quicker database operations.
Correctly Configure Server Cache
Review your settings for database query caching or template caching. Server cache can significantly reduce server load and improve loading times by storing frequently requested content as static versions. This allows the server to respond more quickly without the need to repeatedly process server queries.
Optimize Database Queries
Identify the database queries that 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.
Switch to Cloud Solutions
You can also enhance the TTFB metric by transitioning your infrastructure to one of the Cloud solutions and entrusting operations to global players.
Keep Your Stack Updated
Ensure your development stack is up-to-date. For instance, update systems to the latest PHP versions, keep track of new developments in JS frameworks, and utilize the latest practices offered by development platforms.
Optimizing TTFB – and thus backend performance – is foundational, whether you are optimizing WordPress, Shoptet, Drupal, or a website built on another CMS system.
Read our more detailed article on how backend developers can assist with speed.
A sudden increase in TTFB without an obvious cause? Often, the culprits are bots. Strategies for AI bots.
Regular updates can not only speed up server response but also prevent security threats and attacks on your infrastructure.
For more information on ways to accelerate server response time, visit developers.google.com.
Tags:MetricsCore Web VitalsTTFBCrUXServer
PreviousCore Web Vitals (CWV)NextFirst Contentful Paint (FCP)