Quick answer
Time to first byte (TTFB) is the time from the start of navigation until the first byte of the page’s response arrives. It includes redirects, DNS lookup, connection and TLS setup, and server processing. Good is 800 milliseconds or less.
Formula: TTFB = redirects + service worker start-up + DNS + connection and TLS + request and server processing
What is time to first byte?
Time to first byte (TTFB) is how long the browser waits, from the moment navigation starts, until the first byte of the HTML arrives. Nothing on the page can render before it, so it sets the floor for first contentful paint (FCP) and LCP.
| Rating | TTFB |
|---|---|
| Good | 800 ms or less |
| Needs improvement | 800 ms–1.8 s |
| Poor | over 1.8 s |
What is inside TTFB
| Part | What adds time |
|---|---|
| Redirects | Each hop (http → https → www) is another round trip |
| DNS lookup | Resolving the domain |
| Connection and TLS | Opening the connection and the secure handshake |
| Server processing | Database queries, rendering, uncached pages |
A sample breakdown
Sample data: a store's P75 TTFB is 1.4 s: 0.3 s for two redirects (an http:// ad link to https:// to www), 0.05 s DNS, 0.15 s connection and TLS, 0.9 s for the server to build an uncached category page.
Two fixes: point ad links at the final URL (redirects gone) and cache the category HTML at a CDN for a few minutes (server 0.9 → 0.2 s). New TTFB: 0.05 + 0.15 + 0.2 = 0.4 s.
How to reduce TTFB
- Link to final URLs; remove redirect chains.
- Cache HTML at the edge, even for short periods.
- Use a CDN so connections open close to the visitor.
- Profile slow server work: database queries and third-party API calls made while rendering.
- Check TTFB by country and device; a fast home market can hide slow ones.
TTFB in TapCub
TapCub collects Web Vitals from real visits with the site script (sent once, when the first page is hidden; turn off with data-vitals="false"). In Web analytics › Monitoring › Performance, cards switch between P75, median, P95 and average, the breakdown splits by page, device, browser, country and operating system, and Slowest pages is sorted by P75 largest contentful paint. Details are in the performance docs. The load timing chart there also splits each load into back end (first byte), network transfer and front-end rendering.
Related: first contentful paint and what is a good page load time.
Was this explanation clear?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Technical Engineer
Focuses on tracking code, SDKs, and API integrations, with practical guidance on implementation checks and troubleshooting.