- What is time to first byte?TTFB measures the wait between the moment a browser asks for a page and the moment the first byte of the reply arrives.
- What is included in TTFB?Each redirect adds a full round trip before the real page starts.
- What is a good TTFB?web.dev states that most sites should aim for a TTFB of 0.8 seconds or less, and that values above 1.8 seconds are poor.
What is time to first byte?
TTFB measures the wait between the moment a browser asks for a page and the moment the first byte of the reply arrives. Nothing is visible to the visitor during that time. Every other loading milestone comes after it, so a slow TTFB delays everything that follows.
It is not a ranking factor on its own, and it is not one of the Core Web Vitals. It matters because it limits how early the page can start to render, which affects Largest Contentful Paint, the Core Web Vital that measures how fast the main content appears.
What is included in TTFB?
- Redirects
Each redirect adds a full round trip before the real page starts.
- DNS lookup and connection
Finding the server, opening the connection and negotiating HTTPS.
- Server work
Running code, querying the database and building the response.
- First byte travels back
Distance and network quality decide how long this takes.
What is a good TTFB?
web.dev states that most sites should aim for a TTFB of 0.8 seconds or less, and that values above 1.8 seconds are poor. These thresholds are measured on real visits, at the 75th percentile, which means three out of four visitors should see that value or better. Lab tests are useful for finding problems but are not the same as field data, because real visitors have slower networks and farther distances.
| TTFB (75th percentile) | Rating |
|---|---|
| 0.8 seconds or less | Good |
| Between 0.8 and 1.8 seconds | Needs improvement |
| More than 1.8 seconds | Poor |
What makes TTFB slow?
- An overloaded or underpowered server, common on crowded shared plans.
- No page caching on a dynamic site such as WordPress, so every request runs PHP and the database.
- Slow database queries, heavy plugins and missing indexes.
- A server far from the visitors with no CDN in front.
- Chains of redirects, for example http to https to www to a final URL.
- Slow DNS, or a missing HTTP keep-alive, so each request opens a new connection.
How does hosting affect TTFB?
Hosting affects TTFB in three ways: the power and load of the server, the location of the data center relative to your visitors, and the caching the host provides at server level. A better plan, a nearer data center and built-in page caching all lower it. That is why managed WordPress hosting and a good VPS often respond faster than a crowded budget plan, although a well-configured shared plan can be fine for a small site.
Hosting cannot fix everything. A slow plugin or a heavy query is slow on any server. Measure first, then change one thing at a time.
How do you measure TTFB properly?
Use field data when you can: the Chrome User Experience Report and real-user monitoring show what visitors experience. For lab tests, use a browser’s developer tools or a testing service, and run several tests from locations near your visitors, because a single test from the wrong place misleads. Test a cached page and an uncached page separately; the gap between the two shows how much caching helps.
How can you improve TTFB?
- Enable page caching
Serve finished pages without running PHP for every visit.
- Use a CDN
Cache pages and files near visitors; see what a CDN is.
- Cut redirects
Link directly to the final https URL.
- Upgrade PHP and add object caching
See PHP versions and Redis object caching.
- Move to a better plan or data center
If the server is the limit, resize; see how to choose a VPS size.
What about HTTP/3, NVMe and other upgrades?
Modern protocols and storage can shave time, but each helps a specific case. HTTP/3 mostly helps on poor mobile connections. NVMe storage helps busy databases. Neither replaces caching, which gives the biggest gain for dynamic sites. Fix the largest cost first.
A worked example: diagnosing a slow first byte
A site owner measures a TTFB of 1.9 seconds on a product page. They test a cached page and get 0.3 seconds, so the server is fast when it skips work. The slow page is uncached because it includes personalised content. They check the database queries for that page and find 150 queries, many repeated. Object caching cuts it to 60. A plugin that calls an external service on every load adds 400 milliseconds, so they cache its result for an hour. The page now responds in about 0.7 seconds.
They fixed the issue in the order of impact: caching, queries, then the external call. At no point did they change hosts, because the measurement showed the server was not the problem.
What tools help you find the cause?
| Tool or method | What it shows |
|---|---|
| Browser developer tools | Timing of each request, including waiting time |
| Server logs | Response time per request and slow URLs |
| Query monitoring plugin or database logs | Slow and repeated queries |
| Real-user monitoring | What actual visitors experience by region and device |
| A synthetic test from several regions | Effect of distance and network |