HomeMethod

Knowledge

Web VitalsTechniquesSnippetsAnswersImpactsBottlenecks

TTFB

Time to First Byte

Time from the request being sent to receiving the first byte of the response.

  • Good: ≤ 800ms
  • Needs improvement: ≤ 1800ms
  • Poor: > 1800ms

Browser

GET /

Server

WaitingBuilding the page…First byte sent

DNS 40

Connect 60

TLS 70

Server 380

DNS lookupTCP connectionTLS handshakeThe server builds the responseFirst byte received: that's TTFB

What is TTFB?

Time to First Byte (TTFB) measures the time from the browser sending an HTTP request to receiving the first byte of the server response. It includes DNS lookup, TCP connection, TLS handshake, and server processing time.

Why does it matter?

TTFB is a leading indicator for all other metrics. A slow TTFB delays everything — LCP, FCP, every subsequent resource. Fixing TTFB is high-leverage because it shifts all other timings earlier.

What is a good TTFB?

0ms

Good

0ms800ms1800ms3600ms

Exceptional — server response is very fast.

What contributes to TTFB?

TTFB is the sum of several network and server phases.

  1. 01

    DNS resolution

    Every new hostname requires a DNS lookup to resolve the IP address.

    Fix Use a fast DNS provider. Add dns-prefetch for critical third-party origins. Most CDNs handle DNS close to users automatically.

  2. 02

    Connection and TLS handshake

    A new TCP connection requires a round-trip handshake. TLS adds 1-2 more round trips.

    Fix Enable HTTP/2 or HTTP/3. Use a CDN to terminate TLS close to the user. Enable keep-alive.

  3. 03

    Server processing

    The time the server spends generating the response — PHP execution, database queries, template rendering.

    Fix Full-page caching bypasses PHP entirely for cached pages. Object caching (Redis) stores expensive database results in memory. Deactivate unused plugins.

Need help fixing your TTFB?

Root cause analysis, not plugin guessing. Baseline from field data or lab — wherever you are.

Start an Engagement
Support our family now