Speed
What Is TTFB and Why Your Web Host Controls It
ยท 1 min read
Time to First Byte (TTFB) is how long it takes from a visitor requesting your page to the first byte of HTML arriving back. It's the one speed metric your web host has the most control over.
What's a good TTFB?
| TTFB | Verdict |
|---|---|
| Under 200 ms | Excellent |
| 200โ400 ms | Good |
| 400โ800 ms | Needs improvement |
| Over 800 ms | Poor |
What makes up TTFB
- DNS lookup โ turning your domain into an IP address
- TCP connect โ opening a connection to the server
- TLS handshake โ setting up HTTPS
- Server processing โ PHP, database queries and caching
If server processing is the biggest slice, your host (or missing page cache) is the bottleneck.
How to fix a slow TTFB
- Turn on full-page caching (LiteSpeed Cache, or a static site)
- Enable Brotli or Gzip compression
- Put a CDN such as Cloudflare in front of your site
- Move to a host with LiteSpeed and NVMe storage
Test your host speed now โ it takes about five seconds.