Time to first byte (TTFB)
What is time to first byte (TTFB)?
Time to first byte (TTFB) is the time from requesting a page until the browser receives the first part of the server’s response. It includes any redirects, setting up the connection and the server’s work building the page. Google’s rough guide is 0.8 seconds or less. TTFB is not a Core Web Vital, but every millisecond lost here is added to LCP, which makes it the first number to check when the hosting is under suspicion.
Example
A category page in a WordPress shop has a TTFB of 1.6 seconds. Broken down, the time goes here:
- 0.15 s — connecting to the server and setting up the secure connection;
- 0.35 s — two redirects, from http to https and from the address without www to the one with it;
- 1.1 s — the server rebuilds the page for every visitor, running PHP and database queries.
The redirects go first: links on the site and in the ads now point straight at the final address. Then the page is cached, and the server returns it ready-made in about 0.06 s. The new TTFB is 0.15 + 0.06 = 0.21 seconds, on the same hosting.
Why it matters for a business
TTFB is the number that settles whether the hosting is to blame. A simple test compares a cached page or a static file with a dynamic page such as the basket. If even the static file is slow, the cause is the server or its distance from the visitor, and a move may be justified. If only the dynamic pages are slow, the problem is in the application — the theme, the plugins, the database queries — and pricier hosting will only hide it for a while. That way a new hosting plan is bought on a measurement, not on a sales pitch. Pages that a CMS assembles on every visit are the first candidates for caching.
What to ask
- What is the TTFB on a phone in Bulgaria, and in the countries you sell to?
- How many redirects does a visitor pass through before reaching the page?
- Are pages cached, and which ones cannot be?
- Which version of PHP, or of whatever runs the site, is on the server, and when was it last updated?
We measure the real time to first byte at the start of every website speed optimisation job, and recommend a hosting move only when the numbers support it.