What is Time to First Byte (TTFB)?
Time to First Byte is the delay between asking for a page and getting the beginning of it. It covers everything that happens before any content arrives: the DNS lookup that turns the domain into an address, the connection and security handshake, the time the server spends building the page (running code, querying a database, assembling a template), and the first hop of the response across the network. It is measured in milliseconds and is the earliest point in a page load that can be timed.
TTFB says nothing about how long the page takes to finish loading or when it becomes usable. It isolates the server and the network. A slow TTFB means the visitor is staring at a blank tab before the browser has anything to work with; a fast one means the rest of the load can start immediately.
Why it matters
Why TTFB matters
Every other speed metric sits on top of it. First Contentful Paint and Largest Contentful Paint, the numbers that search engines score pages on, cannot happen until the first byte has arrived, so a slow TTFB drags all of them down at once. Google suggests keeping TTFB under 800 milliseconds, and the best sites are well under half that. Beyond search, the delay is simply felt: a visitor who taps a link and sees nothing for two seconds has already started to doubt the site.
It matters more on repeat visits than people expect. Browsers can cache images and scripts, but the HTML of a dynamic page is usually generated fresh, so a slow server shows itself on every page view.
In practice
How TTFB works in practice
- 01
Measuring it is the easy part: browser developer tools, PageSpeed Insights, WebPageTest and most monitoring services report TTFB directly, and field data from real visitors is available in the Chrome User Experience Report. The diagnostic question is where the time goes. DNS and connection delays point at the hosting and the CDN. Server processing time points at the application: slow database queries, uncached pages, heavy plugins, an underpowered server.
- 02
The fixes follow the diagnosis. Full-page caching serves most visitors a pre-built copy instead of generating the page each time. A content delivery network puts that copy close to the visitor. Database queries get indexed, plugins get pruned, the language runtime gets updated, and the hosting gets upgraded when nothing else helps. For a content site on a managed host, caching and the CDN usually account for most of the improvement.
Watch out
What people get wrong about TTFB
Mistaking it for page speed. A site can have a fast TTFB and still take five seconds to become usable because of heavy scripts and images, and a site with a modest TTFB can feel quick if everything else is lean. The other mistake is measuring from one place: a server in New York will give a fast TTFB to a tester in New York and a slow one to a visitor in Singapore, which is what the CDN is for. Measure from where the audience is.





