Scan a site
ABCDEFGHIJKLMNOPQRSTUVWXYZ
Performance

Time to First Byte (TTFB)

Published: · Updated:

Time to First Byte (TTFB) measures the time from the start of a request until the first byte of the server response is received. It includes redirect time, DNS lookup, TCP and TLS connection setup, and the time the server spends generating the response.

TTFB is not a Core Web Vitals metric, but it directly constrains LCP — the browser cannot render anything before receiving the HTML. As a rule of thumb, a good score is at most 800 ms, and every hundred milliseconds of server delay pushes back the entire loading cascade.

What makes up TTFB

  • Redirects (e.g. HTTP → HTTPS, non-www → www).
  • DNS resolution and TCP + TLS connection setup.
  • Server response generation time (database, rendering, APIs).
  • Network distance between the user and the server.

How to reduce TTFB

The most common improvements are caching full HTML responses (CDN, reverse proxy), generating pages ahead of time (SSG/ISR instead of on-demand rendering), optimizing database queries, HTTP/2 or HTTP/3, and serving content from locations close to users.

Example

TTFB breakdown in DevTools → Network (timing waterfall) — most of the delay is often server-side (waiting/TTFB), not file download.

Typical time breakdown (scenario)
Example
DNS lookup:        12 ms
TCP + TLS:           48 ms
Waiting (TTFB):     620 ms  ← server generating HTML
Content download:    35 ms
─────────────────────────
Total to 1st byte:  680 ms
HTML cache on CDN — response header
HTTP
Cache-Control: public, max-age=60, s-maxage=3600, stale-while-revalidate=86400

Sources & further reading

Check your site performance

Insight measures Core Web Vitals and ranks bottlenecks by impact.

No credit card Report with date and sources No account required