TTFB – Time to First Byte
Time to First Byte (TTFB) measures the time between a browser requesting a page and receiving the first byte of the server response — a key indicator of server performance.
Reviewed by Alexander Yarovenko · Updated: 2026-09-18
What is Time to First Byte?
Time to First Byte (TTFB) is the duration from when a browser sends an HTTP request to when it receives the first byte of a response from the server. TTFB combines DNS lookup time, TCP connection time, TLS handshake, and server processing time.
TTFB Thresholds
| TTFB | Rating |
|---|---|
| < 800ms | ✅ Good |
| 800ms – 1800ms | ⚠️ Needs Improvement |
| > 1800ms | ❌ Poor |
What Affects TTFB
- Server processing — slow database queries, unoptimized PHP/Python code
- Hosting quality — shared hosting vs. dedicated vs. cloud
- Geographic distance — server location relative to the user
- Caching — cached pages respond near-instantly; uncached pages must be generated
- CDN — reduces distance and offloads static content
How to Improve TTFB
- Enable full-page caching (Redis, Varnish, or a CDN edge cache)
- Optimize slow database queries and reduce server-side processing
- Upgrade hosting to a faster plan or switch to a cloud provider
- Use a CDN to serve from edge nodes closer to the user
TTFB and SEO
TTFB directly impacts LCP — a slow server response delays all subsequent loading. Google has stated that fast TTFB is important but it's an indirect rather than direct ranking signal. Still, a TTFB above 2 seconds typically leads to poor Core Web Vitals scores overall.
Decision guide
| Use when | Treat TTFB as the sum of redirects, network negotiation and backend response. A faster application cannot compensate for an avoidable redirect before the document request. |
|---|---|
| How to verify | Measure uncached and cached requests from relevant regions, inspect database and application timing, then test CDN or cache changes separately. Preserve response correctness while reducing the slowest component. |