ratemysite.ai

How to reduce Time to First Byte below 800 ms

Time to First Byte should be under 800 milliseconds. It is the server and network time before the first byte of HTML arrives, and every other metric starts after it. Cache HTML at the CDN, reduce work done per request and use a faster host or edge rendering.

By . Updated .

How do you fix it?

  1. Measure TTFB with curl -o /dev/null -s -w "%{time_starttransfer}\n" https://yourdomain/ from more than one location.
  2. Cache full HTML pages at a CDN with a sensible s-maxage, so most requests never reach your origin.
  3. Reduce work per request: remove slow database queries, add object caching and avoid chains of redirects.
  4. Move to a faster host, or render at the edge, if the origin is far from your visitors.
  5. Re-run the audit and confirm the TTFB check passes.

What is Time to First Byte?

TTFB is the time between a request starting and the first byte of the response arriving. It includes DNS lookup, connection setup, TLS, redirects and server processing. Because the browser can do nothing visible until HTML starts to arrive, a slow TTFB delays everything after it. Reducing TTFB by 300 ms usually improves LCP by the same amount.

How do I speed up the server side?

Look at where the time goes. A cold database query, an uncached page build or a distant server each add hundreds of milliseconds. A CDN removes distance and caches whole pages. Static generation turns every page into a file, which is the fastest approach. For dynamic sites, use full page caching, keep plugins to a minimum and fix slow queries. Also avoid redirect chains: each hop adds a full round trip before any content is returned.

How much does this check matter?

What else do people ask?

Is TTFB a Core Web Vital?
No, but it is a diagnostic metric. Good TTFB makes a good LCP much easier because LCP cannot happen before the first byte.
What is a good TTFB?
Under 800 ms at the 75th percentile is good, and under 200 ms is an aspirational target for static pages served from a CDN, not a standard.

Sources