# What is TTFB (time to first byte)? What is a good value and how to improve it

> What time to first byte measures, what a good value looks like, what slows it down and how hosting, caching and a CDN affect it.

Source: https://comparehostingonline.com/guides/what-is-time-to-first-byte/

## Short answer

Time to first byte (TTFB) is how long a browser waits for the first byte of a response after requesting a page. It includes DNS, connection setup and the time your server takes to build the page. web.dev suggests aiming for 0.8 seconds or less at the 75th percentile of visits.

Last verified Nov 28, 2026 · [How we test](https://comparehostingonline.com/methodology/)

At a glance

-   **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?

1.  1
    
    **Redirects**
    
    Each redirect adds a full round trip before the real page starts.
    
2.  2
    
    **DNS lookup and connection**
    
    Finding the server, opening the connection and negotiating HTTPS.
    
3.  3
    
    **Server work**
    
    Running code, querying the database and building the response.
    
4.  4
    
    **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](https://comparehostingonline.com/hosting-types/managed-wordpress/) and a [good VPS](https://comparehostingonline.com/best/vps-hosting/) 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?

1.  1
    
    **Enable page caching**
    
    Serve finished pages without running PHP for every visit.
    
2.  2
    
    **Use a CDN**
    
    Cache pages and files near visitors; see what a CDN is.
    
3.  3
    
    **Cut redirects**
    
    Link directly to the final https URL.
    
4.  4
    
    **Upgrade PHP and add object caching**
    
    See PHP versions and Redis object caching.
    
5.  5
    
    **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](https://comparehostingonline.com/guides/what-is-http-3-and-hosting/) mostly helps on poor mobile connections. [NVMe storage](https://comparehostingonline.com/guides/nvme-vs-ssd-hosting/) 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 |

## Sources and further reading

-   [web.dev: Time to First Byte (TTFB)](https://web.dev/articles/ttfb)
-   [web.dev: Web Vitals](https://web.dev/articles/vitals)
-   [MDN: HTTP caching](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching)

## Common questions

What is a good time to first byte?

web.dev recommends aiming for 0.8 seconds or less at the 75th percentile of real visits, and treats more than 1.8 seconds as poor. Measure on real-user data where you can, because lab tests from one location can mislead.

Is TTFB a Google ranking factor?

It is not a Core Web Vital and not a direct ranking factor. It matters because a slow first byte delays everything after it, which hurts Largest Contentful Paint, and that is part of the page experience signals.

What causes a high TTFB?

An overloaded server, no page caching, slow database queries or heavy plugins, a server far from visitors, redirect chains and slow DNS. Find which part dominates by testing cached and uncached pages and by checking server response time separately.

How can I reduce TTFB?

Turn on page caching, add object caching for dynamic sites, use a CDN, remove extra redirects, upgrade PHP and move to a faster plan or a nearer data center if the server is the limit. Change one thing at a time and re-test.

Does a CDN improve TTFB?

For cached files and pages, yes, because the response comes from a nearby server. For uncached dynamic pages the request still reaches your origin, so a slow server stays slow. Combine a CDN with server-side caching.

## Related

[What is a CDN?](https://comparehostingonline.com/guides/what-is-a-cdn/) [What 99.9% uptime means](https://comparehostingonline.com/guides/what-99-9-uptime-means/) [Best VPS hosting](https://comparehostingonline.com/best/vps-hosting/)

## More guides

[Cloud hosting vs VPS hosting: differences, costs and which to choose](https://comparehostingonline.com/guides/cloud-vs-vps-hosting/) [Managed vs unmanaged VPS: who does what and which to choose](https://comparehostingonline.com/guides/managed-vs-unmanaged-vps/) [How to secure a new VPS: a first-hour hardening checklist](https://comparehostingonline.com/guides/how-to-secure-a-vps/) [What is DDoS protection in hosting? What it covers and what to ask](https://comparehostingonline.com/guides/what-is-ddos-protection/) [What is a web application firewall (WAF)? How it works and when you need one](https://comparehostingonline.com/guides/what-is-a-web-application-firewall/) [Bandwidth, storage and data transfer: what is the difference?](https://comparehostingonline.com/guides/bandwidth-vs-storage-vs-transfer/)

MH

**[Muhammad Hamza](https://comparehostingonline.com/team/muhammad-hamza/)** Founder & Editor

Writes and signs off every comparison, and runs the compliance reviews. Has worked on SOC 2 and HIPAA compliance programs for companies.

Our [editorial policy](https://comparehostingonline.com/editorial-policy/) and [testing method](https://comparehostingonline.com/methodology/) are public.
