Skip to content
Free website migration on every plan, done by our team.Learn more ›
Performance

Time to first byte (TTFB): what it is and how to improve it

What time to first byte measures, what a good TTFB is, the main causes of a slow one and practical fixes from caching and PHP versions to hosting and CDNs.

Short answer: TTFB is the time between a browser requesting a page and receiving the first byte of the response. It covers DNS, connection setup and the server building the page. Aim for 0.8 seconds or less. Page caching is usually the biggest single improvement.

What affects TTFB

  1. Server work: PHP and database queries building the page.
  2. Distance: how far the visitor is from the server.
  3. Connection setup: DNS lookups, TCP and TLS handshakes.
  4. Server load: busy or under-sized servers respond more slowly.

How to measure it

Use PageSpeed Insights, your browser's developer tools (the "Waiting for server response" timing) or a monitoring service. Test several times; one result can mislead.

How to improve it

  1. Page caching so pages don't have to be rebuilt for each visitor. See caching explained.
  2. A recent PHP version. See which PHP version to use.
  3. Object caching with Redis for dynamic or logged-in pages.
  4. Fewer heavy plugins and fewer slow database queries.
  5. A CDN for visitors far from your server. See what a CDN is.
  6. Fast hosting on NVMe storage, close to your audience.

TTFB and Core Web Vitals

TTFB isn't a Core Web Vital itself, but a slow TTFB delays everything after it, including Largest Contentful Paint. See Core Web Vitals.

Frequently asked questions

Why is TTFB slow only on some pages?

Uncached or heavy pages, such as search results or carts, take more work to build.

Does a CDN always fix TTFB?

It helps cached content and distant visitors. Dynamic pages still depend on your server.

Is TTFB the same as page load time?

No. It's only the first part of loading a page.

Ready when you are

Host it where it performs

NVMe speed, offshore privacy and a written SLA — live in minutes on AuroxHost.