Creative agency glossarySEO and Analytics

Time to First Byte (TTFB)

Time to First Byte (TTFB) is the time between a browser requesting a page and receiving the first byte of the response, a measure of how quickly the server starts answering.

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

  1. 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.

  2. 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.

Questions

People also ask

What is a good TTFB?

Google recommends 800 milliseconds or less, and fast sites are typically between 200 and 500 milliseconds. Anything over a second is worth investigating, because every later speed metric is delayed by the same amount.

Does TTFB affect SEO?

Indirectly but meaningfully. TTFB is not a ranking factor on its own, but it delays Largest Contentful Paint and the other Core Web Vitals, which are. A slow server makes it hard to pass those thresholds regardless of how well the front end is built.

How can I reduce TTFB?

Enable full-page caching, use a content delivery network, optimize slow database queries, remove heavy plugins and make sure the hosting is adequate for the traffic. Measure before and after from the locations where your visitors actually are.

Next to it in the glossary

  1. 200 (OK) Response CodeA 200 OK response code is the server's confirmation that a request succeeded and the page was delivered as asked.
  2. 301 RedirectA 301 redirect is a permanent instruction that sends browsers and search engines from an old URL to a new one, carrying the old page's ranking signals with it.
  3. 302 RedirectA 302 redirect is a temporary instruction that sends visitors from one URL to another while telling search engines the original address will return.
  4. 304 Not ModifiedA 304 Not Modified response tells a browser or a crawler that the page has not changed since it was last fetched, so the cached copy can be used instead.
  5. 307 Temporary RedirectA 307 Temporary Redirect sends a visitor to a different URL for now, while guaranteeing that the request is repeated exactly as it was made.
  6. 403 ForbiddenA 403 Forbidden error means the server understood the request but refuses to serve the page, usually because the visitor does not have permission to see it.

Every SEO and Analytics term →

In the work

Where it shows up

All our creations →

From the journal

Read around it

The journal →

Talking the talk is one thing

We make the work.

RIOT is a creative agency and production studio in New York. Strategy, brand, film, photography, design and the campaigns that carry them, made by one team. A few lines is enough to start: we read every brief the same day.

    Footage