TTFB (time to first byte) is how long it takes from a browser's request until the first byte of the server's response arrives.

TTFB, or time to first byte, measures the delay between a browser asking for a page and the first byte of the response arriving back. It covers the network trip to the server, any connection setup, and the time the server spends working out what to send. It doesn't include downloading the rest of the page, its images or its scripts.

If you click a link and the screen stays blank for a second before anything appears, a slow TTFB is often the reason. Nothing else on the page can start loading until that first byte turns up.

What makes up TTFB

TTFB is the sum of several steps:

  1. DNS lookup: finding the server's IP address
  2. Connection: opening a connection and, for HTTPS, negotiating encryption
  3. Server processing: running PHP, querying the database and building the page
  4. Response: the first part of the reply travelling back to the browser

The server processing part is often called server response time. On a dynamic site, it's usually the biggest slice.

What is a good TTFB?

Google's web.dev guidance suggests aiming for a TTFB of 0.8 seconds or less for most sites. A cached page on good hosting is often under 200 milliseconds. TTFB isn't a Core Web Vital itself, but a slow one pushes back Largest Contentful Paint, which is.

How to improve TTFB

  • Use page caching so the server sends a ready-made page instead of rebuilding it for every visitor. On LiteSpeed servers, LSCache does this for WordPress.
  • Add an object cache like Redis to cut repeated database queries.
  • Use a CDN to serve pages and files from locations closer to your visitors.
  • Keep PHP current, since newer versions run the same code faster, and keep OPcache on.
  • Trim slow plugins and heavy database queries.
  • Choose fast hosting with modern processors and NVMe storage.

AblePage plans include LSCache for WordPress and PHP 8.1 to 8.4, with Redis object caching available, so most of these are already within reach.

How to measure TTFB

You can check TTFB in your browser's developer tools under the Network tab, in PageSpeed Insights, or from the command line with curl. Test a few times and from different locations, because the first request after a quiet spell is often slower while caches warm up. Compare cached pages with logged-in or checkout pages, which usually can't be cached.

TTFB vs page load time

TTFB tells you how quickly the server responds. Total load time also includes images, fonts, scripts and the browser's own rendering work. A site can have a great TTFB and still feel slow because of heavy front-end code, so look at both numbers.

TTFB questions

What is a good TTFB?
Around 0.8 seconds or less is a reasonable target, and a well-cached page on good hosting is often under 200 milliseconds.
Does TTFB affect SEO?
Indirectly. TTFB isn't a ranking factor by itself, but a slow one delays Largest Contentful Paint, which is part of Google's Core Web Vitals.
Why is my TTFB slow?
Usually because the server is building every page from scratch. Missing page caching, slow plugins, heavy database queries and distance from the server are the common causes.
Was this definition helpful?
Share this definition