What is TTFB (time to first byte)?
Short answer
TTFB (Time To First Byte) is the time from sending a request until the first byte of the response arrives. It includes DNS lookup, connection, TLS handshake and the time the server needs to build the response. According to web.dev, up to 800 milliseconds is good and above 1,800 milliseconds is poor. A high TTFB delays everything that follows, including the Largest Contentful Paint.
- Good up to 800 ms, needs improvement up to 1,800 ms, poor above.
- Main causes: slow server code, database, missing cache, distant server.
- Watch the trend over days – single measurements vary.
TTFB stands for Time To First Byte and measures the time from sending a request to the arrival of the very first byte of the response from the server. It is one of the most meaningful early performance indicators, because it shows how quickly your server even begins to respond — before any content is rendered. This entry explains what TTFB is composed of, which values are realistic and which levers lower it.
What TTFB is composed of
TTFB is not a single quantity but the sum of several steps that all run before the first byte comes back. First the domain name must be resolved via DNS. Then a connection is established, with HTTPS including the TLS handshake for encryption. Only after that does the actual request reach the server, which processes it — database queries, program logic, assembling the response — and finally sends the first byte back.
This breakdown matters because it shows where a high TTFB can come from. A slow DNS resolution, a distant server, an expensive TLS handshake or sluggish server-side processing — each of these parts contributes. Whoever wants to lower TTFB must know which step eats the bulk of the time.
Why TTFB matters
TTFB is the starting gun for everything that follows. As long as the first byte is not there, the browser can render nothing, request no further resources and show the user nothing. A high TTFB therefore inevitably delays the entire loading process — it is a base charge added on top of every other optimisation.
For the user experience this means: the faster the first byte arrives, the faster the page feels. For SEO, TTFB is relevant as part of the overall load time, and indirectly a consistently low server response time also influences the crawl rate, because search engines impose more requests on a fast-responding server.
Which values are good
As rough guidance, a TTFB under 200 milliseconds counts as very good, values up to about 500 milliseconds as acceptable, and anything clearly above that as in need of improvement. These figures are not hard limits but guide values — the realistic target depends on how far your users are from your server and how dynamic your pages are.
More important than a single reading is the trend. A TTFB that stays stably low over weeks speaks for healthy infrastructure; one that slowly rises is often an early warning sign of growing load, an overloaded database or declining server performance. This is why ongoing observation is more meaningful than a one-off measurement.
- Under 200 ms — very good
- 200 to 500 ms — acceptable
- Over 500 ms — in need of improvement
- A rising trend — an early warning sign, regardless of the absolute value
How to lower TTFB
The most effective lever is usually caching. A page held server-side or served as a static response skips the expensive processing and delivers the first byte almost instantly. An upstream content delivery network such as Cloudflare additionally brings the response geographically closer to your users and thus considerably shortens the network and TLS time.
Enable a page cache Update PHP / runtime Index slow database queries Use a CDN or a server close to your users
On the server side, faster database queries, leaner program logic and adequately dimensioned resources help. Often the biggest time saving lies in eliminating individual slow queries. Server-side infrastructure close to the audience and an efficient TLS configuration also contribute to a low TTFB.
TTFB and total load time
TTFB is only the first segment of the loading process, not the whole. After the first byte come the download of the rest of the document, the loading of images, scripts and styles, and the rendering in the browser. A low TTFB is therefore necessary but not sufficient for a fast page — a lightning-fast server can be slowed down again by heavy front-end resources.
Still, it is worth starting with TTFB, because it precedes all other steps and can often be improved with comparatively little effort. Considering it in connection with the rest of the load time prevents optimising the wrong end.
TTFB, Core Web Vitals and LCP
TTFB does not stand in isolation but forms the foundation of the loading perception search engines measure through the Core Web Vitals. Especially close is the connection to the Largest Contentful Paint (LCP) — the time until the largest visible element has loaded. Because nothing can be rendered before the first byte arrives, a high TTFB feeds directly into a poor LCP; it is, in effect, the lower bound that no front-end, however fast, can undercut.
This makes TTFB a worthwhile starting point when the Core Web Vitals are to be improved. Often much effort goes into images and scripts, while the actual delay already sits in the slow first byte. Whoever wants to lower the LCP should therefore first check what share TTFB has in it, before optimising the front end.
Why dynamic pages start slower
Not every high TTFB is a fault — some pages are inherently more expensive to produce. A static page can be held ready and delivered almost instantly; a personalised, logged-in or heavily data-driven page must be assembled afresh from database queries and logic on every request. This work costs time, which shows up in a higher TTFB.
The usual way out is to precompute or cache as much as possible: cache frequent queries, take expensive calculations out of the request path and serve static parts separately from the dynamic core. What matters is setting realistic expectations — a complex application page will never reach the TTFB of a static landing page, and it does not have to. What is decisive is a stable, controlled value without a creeping rise.
Measuring TTFB reliably
A single TTFB value should be taken with caution, because the time to the first byte fluctuates from measurement to measurement. A cold cache, a background task running just then or a brief load spike can slow a single fetch without that reflecting the normal state. Whoever draws far-reaching conclusions from a single measurement easily optimises against a random result.
TTFB becomes meaningful only across many measurements. The first fetch after clearing the cache is naturally slower than the following ones, in which held responses take effect — both states are real and both should be known. Equally important is distinguishing measurements in the lab under ideal conditions from measurements in real operation, because only the latter show what users actually experience.
The most reliable approach is therefore ongoing measurement at the same point over time. It smooths individual outliers, makes daily patterns and load dependencies visible and — most importantly — uncovers creeping deteriorations long before they would catch the eye as a single bad value.
- Single values fluctuate — look at several measurements
- Cold versus warm cache: know both states
- Distinguish the lab from real operation
- A trend over time beats any snapshot
First aid for a suddenly high TTFB
If TTFB rises abruptly, an orderly approach pays off rather than wild trial and error. The first look goes to the timing: if the rise coincides with a deploy, a configuration change or a load spike, the cause is usually to be found there. Monitoring that records response times over time makes exactly this attribution possible, because it makes the moment of deterioration visible.
After that, you narrow down the steps that TTFB is composed of. Is the DNS resolution slow, the TLS handshake expensive or the server-side processing the bottleneck? Often the cause lies in a single query that has become slow, a full cache or an overloaded server. Whoever knows the sub-steps can act specifically there, instead of rebuilding the entire infrastructure on suspicion.
Response time in monitordefend
monitordefend records the response time of your homepage with every uptime check, every five minutes, and keeps it as a trend for 24 hours, 7, 28 or 90 days. The value measured is the time until the server’s response arrives, which is close to TTFB. The tile shows the average of the chosen period, coloured green up to 800 milliseconds, yellow up to 1,800 milliseconds and red above, following web.dev guidance.
You can set your own threshold per website – 2,000 milliseconds by default – and receive one email when the response time crosses it, not one every five minutes. Because the response time sits next to uptime, storage and the other checks on one timeline, a creeping rise is easy to connect with a deploy, a full disk or a traffic peak. The free page-speed test breaks a single request down into DNS, connection, TLS and time to first byte.
Frequently asked questions
What is a good TTFB value?
Under 200 milliseconds counts as very good, up to about 500 milliseconds as acceptable. The realistic target depends on the distance of your users from the server and the dynamics of your pages; more important than the single value is a stable, low trend.
What is the difference between TTFB and load time?
TTFB measures only the time to the first response byte. The total load time additionally covers the download and rendering of all resources. A low TTFB is a necessary foundation but alone does not guarantee a fast page.
How do I lower TTFB fastest?
Usually through caching and an upstream CDN such as Cloudflare that brings the response closer to your users. Server-side, faster database queries and leaner logic help; often the biggest saving lies in individual slow queries.
Does TTFB affect my SEO?
Indirectly yes. As part of the load time it acts on the user experience, and a consistently low server response time can favour the crawl rate, because search engines impose more requests on fast-responding servers.
Page Speed & TTFB Test
Free, no sign-up. We only fetch the public URL you enter.