What is Time to First Byte (TTFB)?

Time to First Byte (TTFB) is how long it takes from the moment a browser starts navigating to a page until the first byte of the server's response arrives. It measures the part of loading that happens before the browser has anything to work with, so every other metric, including Largest Contentful Paint, sits on top of it.

TTFB is not a Core Web Vital, but Google's guidance treats 0.8 seconds or less as good and over 1.8 seconds as poor. A slow TTFB makes a good LCP very hard to reach.

How it works

TTFB as measured in the field includes several stages:

  1. Redirects, if the requested URL redirects before reaching the final page.
  2. Service worker startup, if one is installed.
  3. DNS lookup to resolve the domain.
  4. Connection and TLS negotiation.
  5. Server processing: running application code, querying the database, and building the HTML, until the first byte is sent.

For dynamic sites, the server processing stage is usually the biggest. A cached HTML page served from a CDN edge near the visitor can arrive in well under 200 ms; a page generated from scratch on a busy shared server can take over a second.

Googlebot also notices slow responses. In Search Console's Crawl stats report, rising average response times can lead Google to crawl the site less.

Example

Measure it from the command line:

code
$ curl -o /dev/null -s -w "TTFB: %{time_starttransfer}s\n" https://example.com/pour-over-guide/
TTFB: 0.912s

Run it a few times and from different locations, since the first request may miss the cache. The Network panel in Chrome DevTools shows the same figure as "Waiting for server response" in each request's Timing tab.

In WordPress

Every uncached WordPress request loads PHP, WordPress core, the theme, and every active plugin, then queries the database. Full-page caching (from the host, a caching plugin, or a CDN that caches HTML) removes most of that work for anonymous visitors. After that, the levers are a current PHP version, a persistent object cache such as Redis for logged-in and WooCommerce traffic, fewer heavy plugins, and better hosting. Hydrogen SEO's site health score includes a performance area; see site health score.

Common mistakes

  • Redirect hops in front of the page, such as HTTP to HTTPS to www.
  • Bypassing the cache with query strings or cookies on every request.
  • Testing only from nearby, when visitors on other continents wait much longer without a CDN.

Common questions

What is a good TTFB?

Google's guidance is 0.8 seconds or less at the 75th percentile. Lower is better, since it leaves more of the LCP budget for loading content.

Is TTFB a ranking factor?

Not directly; it is not a Core Web Vital. It affects LCP, which is, and very slow responses can reduce how much Google crawls.