Skip to content
hostcomplex

What Is Time to First Byte

Maarten Soetens 2 min read

What Time to First Byte Measures

Time to first byte (TTFB) is the time from when a browser starts a request for a page until it receives the first byte of the response. It measures how quickly the server starts answering, not how long the full page takes to load.

TTFB includes everything that happens before the first byte arrives. The browser must find the server's address, open a connection, complete any encryption handshake, send the request and wait while the server prepares the response. The result is a single number, but it hides several separate steps.

The Parts of TTFB

  1. DNS lookup, translating the domain name into the address of the server.
  2. Connection, setting up the network connection to the server.
  3. TLS negotiation, agreeing on encryption for HTTPS pages.
  4. Server processing, the time the server takes to generate the response, including database queries and application code.

On a repeat visit, the browser can skip some steps because it already holds a DNS answer or an open connection. For dynamic sites, server processing is often the largest part. For visitors far from the server, network distance can dominate instead. Both patterns vary from site to site.

What a Good TTFB Is and What Drives It

Google suggests a TTFB of 800 milliseconds or less as a good target for most sites. It is a diagnostic guideline rather than one of the Core Web Vitals, and a single slow response can be an outlier, so look at typical values over many visits.

Several factors drive the number. Server resources matter, since a small or busy server may queue requests. Application design matters, because pages that run many database queries take longer to build. Distance matters, since a server far from visitors adds network delay to every step. Server-side caching, which stores finished responses for reuse, can cut processing time for common pages. Hosting limits such as the number of PHP workers also decide how many requests can be served at once.

Frequently asked questions

What is a good TTFB?

Google suggests 800 milliseconds or less as a good target for most sites. Values well above that usually point to server or network delays. Judge the value over many visits, because one slow response can come from a temporary spike rather than a lasting problem.

Can a CDN reduce TTFB?

In some cases, yes. A content delivery network keeps copies of content closer to visitors, which shortens network distance and can answer some requests without reaching the origin server. The details, and when this helps, are covered in separate guides on content delivery networks.

Is TTFB the same as page load time?

No. TTFB covers only the wait before the response starts arriving. Page load time includes downloading, parsing and rendering everything else, so a page can have a good TTFB and still load slowly because of heavy images or scripts.

  • Two-Factor Authentication

    Two factor authentication hosting adds a second check to control panel, domain and CMS logins. Learn which methods are strongest and why 2FA helps.

  • What Is an A Record?

    What is an A record? Learn how this DNS record maps a hostname to an IPv4 address, why domains use several A records and the root and www pattern.

  • Billing and Automation Platforms

    What is WHMCS? Learn how this commercial billing and automation platform helps hosts sell plans, collect payments and create accounts automatically.