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.
What problem does it solve?
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 score?
How to improve TTFB
The key is to tackle issues related to each contributing phase.
DNS resolution
Every new hostname requires a DNS lookup to resolve the IP address. A slow DNS provider or lack of DNS caching adds latency before any connection is made.
Use a fast DNS provider. Add dns-prefetch for critical third-party origins: <link rel="dns-prefetch" href="//fonts.googleapis.com">. Most CDNs handle DNS close to users automatically.
Connection & TLS handshake
A new TCP connection requires a round-trip handshake. TLS adds 1–2 more round trips. For distant servers, each round trip adds significant latency.
Enable HTTP/2 or HTTP/3 (QUIC reduces handshake overhead to near-zero). Use a CDN to terminate TLS close to the user. Enable keep-alive to reuse existing connections.
Server processing
The time the server spends generating the response — PHP execution, database queries, template rendering. For WordPress, this includes every active plugin being bootstrapped.
Full-page caching (WP Rocket, W3 Total Cache) bypasses PHP entirely for cached pages. Object caching (Redis) stores expensive database results in memory. Deactivate unused plugins.
Root cause analysis, not plugin guessing. Baseline from field data or lab — wherever you are.