Response Time & Page Speed

What Is Time to First Byte (TTFB)? How to Measure & Reduce It.

Written by Laura Clayton Verified by Alex Ioannides 11 min read Updated Nov 23, 2026
0%

TL;DR (QUICK ANSWER)

TTFB is the time between a browser requesting a page and the first byte of the response arriving. Google treats 0.8 seconds or less as good and more than 1.8 seconds as poor. To reduce it, start with better hosting, page caching, and a CDN, then remove redirects.

Before anything appears on a page, the browser has to wait for the server to send its first byte. That wait is time to first byte (TTFB).

Until then, the visitor looks at a blank screen. Text, images, and scripts can’t start loading, so a slow first byte makes everything after it slow too. Here’s what TTFB measures, what a good TTFB is, and how to fix a slow one.

UptimeRobot
Downtime happens. Get notified!
Join the world's leading uptime monitoring service with 3.5M+ happy users.

Key takeaways

  • TTFB is a total. Redirects, DNS lookup, the secure connection, and the time your server spends building the page all count.
  • 0.8 seconds or less is good. More than 1.8 seconds is poor.
  • TTFB isn’t a Core Web Vital, but a slow TTFB delays Largest Contentful Paint, which is.
  • Check real visits first to see whether TTFB is a problem. Then use a lab tool to find the slow step.
  • Fix hosting, caching, and the CDN first. Then cut redirects.

What counts toward TTFB?

TTFB is one number made of several steps. The clock starts when the browser requests the page, and stops when the first byte of the response arrives.

Every step in between is part of the time:

  1. Redirects: If the URL redirects, the browser goes to the new address and starts again.
  2. Service worker startup: Some sites run a script in the browser that handles requests. If yours does, it starts first.
  3. DNS lookup: The browser finds the server’s IP address with a DNS query.
  4. Connection and TLS: The browser connects to the server and sets up encryption for HTTPS.
  5. Server processing: The server runs your code and database queries to build the page.
  6. First byte: The first byte of the response arrives, and the clock stops.
TTFB timeline: redirects, service worker startup, DNS lookup, connection and TLS, and server processing, all counted before the first byte arrives

Server processing is the step your backend controls most directly. The rest depends mostly on where the visitor is, their connection, and how many redirects they pass through. 

So, the same page can get its first byte quickly near your server and slowly on the other side of the world. 

If the server sends a 103 Early Hints response first, Chrome counts that as the first byte, so TTFB can look faster than the real response. More on that below.

What is a good TTFB?

Google rates TTFB in three bands. It doesn’t judge your fastest visit or your average, it looks at the 75th percentile of real visits, so three out of four page loads need to hit the target.

RatingTTFB at the 75th percentile
Good800 ms or less
Needs improvementMore than 800 ms, up to 1.8 s
PoorMore than 1.8 s

The bands come from Google’s guide to TTFB, which calls 0.8 seconds a rough guide, not a hard rule.

The number works backwards from what visitors see. The first byte has to arrive early enough for the first content to appear quickly. If it’s late, the browser has nothing to draw.

It’s a good rule of thumb to use 0.8 seconds as a starting point, and compare each page with its own usual TTFB. Check it from every region your visitors come from, too. A page that’s fast in Europe can miss the target in Australia.

Why lab and field TTFB differ

Field data comes from real visits. Lab data comes from one test, on one connection, from one place.

When the two disagree, it’s usually one of three things:

  • Redirects: Lab tools often test the final URL. Real visitors arrive through ads, newsletters, and short links that redirect first.
  • Caching: A lab test of a popular page usually gets a cached copy. Visitors also land on older pages that aren’t cached.
  • Network: A lab test uses one connection. Field data covers every visitor’s device, network, and distance from your server.
Tips & Tricks
If field TTFB is much higher, test a page the cache can’t answer. Add a random parameter to the URL, such as ?nocache=123. If TTFB jumps, the cache was hiding a slow backend.

Does TTFB matter for SEO & Core Web Vitals?

Not directly, because TTFB isn’t a Core Web Vital. It still affects SEO in two ways.

Through LCP

Largest Contentful Paint (LCP) is a Core Web Vital, and Google uses Core Web Vitals in its ranking systems. The main content can’t appear before the first byte arrives, so a slow TTFB makes LCP slower too.

Through crawling

Google’s crawl budget guide says Google crawls less when a site’s responses get slower, and it names TTFB as one of the response times it watches. That matters most for large sites with many pages.

TTFB vs. FCP and LCP

TTFB is the first step of every page load. First Contentful Paint (FCP) and LCP come after it, so every millisecond of TTFB is added to both.

Google rates FCP as good at 1.8 seconds or less, and LCP at 2.5 seconds or less. A page with a 1.5-second TTFB has used most of its 1.8-second FCP budget before anything appears on screen.

Why TTFB alone can mislead

A lower TTFB doesn’t always mean a faster page, and a higher one doesn’t always mean a slower page.

  • 103 Early Hints: The server sends a quick 103 response while it builds the page, so the browser can start loading CSS and fonts. Chrome counts that early response as the first byte, so TTFB looks fast even when the server is slow.
  • Early flushing: The server sends the top of the page before the rest is ready. That counts as the first byte too, while the rest is still being built.
  • Compression: Compressing HTML on the fly makes the response smaller, but it adds work before anything is sent.
  • Rendering model: A single-page app can answer fast with an empty shell and still show content later than a server-rendered page with a higher TTFB.
Tips & Tricks
Read TTFB together with FCP and LCP. If TTFB drops and LCP doesn’t, the page didn’t get faster for visitors.

How to measure TTFB

Start with field data. It tells you whether real visitors get a slow TTFB. Then use a lab tool to find which step is slow.

All the tools below are free. To see more options, see our list of website speed testing tools.

PageSpeed Insights

Enter a URL in PageSpeed Insights. The top section shows TTFB from real Chrome users over the last 28 days, if your site has enough traffic. It’s labeled “Discover what your real users are experiencing.”

Below it, the lab test’s “Document request latency” check flags a slow response for the page itself.

Pagespeed Insights example wikipedia.com

Chrome DevTools

Open DevTools, select the Network panel, and reload the page. Click the HTML document request and open the Timing tab.

The “Waiting for server response” row is one round trip plus your server’s time to build the page. The “DNS Lookup” and “Initial connection” rows above it are part of TTFB too.

Chrome devtools example

WebPageTest

WebPageTest runs a free test from the location, browser, and connection you choose. Run one test from near your server and one from where your visitors are. The difference shows how much of your TTFB is distance.

curl

From a terminal, curl shows how long each step of one request took:

curl -o /dev/null -s -w "DNS: %{time_namelookup}s\nConnect: %{time_connect}s\nTLS: %{time_appconnect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n" https://example.com/
Terminal showing curl timing for one request: DNS 0.002 s, connect 0.044 s, TLS 0.077 s, TTFB 0.430 s, total 0.433 s
Example output with illustrative timings. Your results will differ.

Each value counts from the start of the request, so the TTFB line already includes DNS, connection, and TLS. curl doesn’t follow redirects unless you add -L, so test the final URL. One run is one sample, so run it a few times.

web-vitals JavaScript library

To collect TTFB from real visitors on your own site, add Google’s web-vitals library and report it with one function:

import {onTTFB} from 'web-vitals';

onTTFB(console.log);

Send the value to your analytics instead of the console. It works in Chromium, Firefox, and Safari.

Search Console crawl stats

In Search Console, open Settings, then Crawl stats. The report shows the average response time for everything Googlebot fetched from your site.

It isn’t TTFB, but a rising line means Googlebot is waiting longer for your server, too. Google says sites with fewer than a thousand pages rarely need this report.

What causes a slow TTFB

A slow TTFB comes from one of the steps above. Either the server takes too long to build the page, or the request takes too long to reach it.

Here’s how to tell which:

CauseHow to spot it
Underpowered or shared hostingTTFB is high across the whole site and gets worse at busy times
No page cache, or a cache missPopular pages are fast and rarely visited pages are slow. A random URL parameter makes a fast page slow
Slow database queries or backend codeThe “Waiting for server response” row in DevTools is long, while DNS and connection are short
Calls to third-party APIs while the page is builtServer-Timing headers or your APM tool show time spent waiting on an outside service
Distance from the server, no CDNTTFB is fine near the server and slow from other regions
RedirectsThe first response is a 301 or 302 status code, and field TTFB is much higher than a lab test of the final URL
Slow DNSThe “DNS Lookup” row is long on a first visit
Outdated server softwareYour PHP, database, or web server version is several releases behind

How to reduce TTFB

Start with the fixes that remove the most work and distance.

  1. Get hosting that fits your traffic. Cheap shared hosting is often the bottleneck. Check that your plan gives the site enough memory and keeps the server software current. Our list of web hosting providers compares the options.
  2. Cache full pages and database results. A page cache serves finished HTML instead of building the page on every visit. An object cache such as Redis or Memcached keeps query results in memory.
  3. Put a CDN in front of the site. A CDN answers from servers close to the visitor. It helps most when the HTML itself is cached at the edge. Set Cache-Control headers that allow it, and make sure tracking parameters in your URLs don’t skip the cache.
  4. Tune the database and backend. Add indexes for slow queries and profile your slowest pages. Move calls to outside APIs out of the page build. A Server-Timing header shows how long each step takes, right in DevTools.
  5. Remove redirects. Link to the final URL, with https:// and the right trailing slash. An HSTS header skips the HTTP to HTTPS redirect on repeat visits.
  6. Run a current PHP version or runtime. New releases of languages, web servers, and databases are often faster.
  7. Turn on HTTP/2 or HTTP/3 and TLS 1.3. TLS 1.3 needs fewer round trips to set up encryption. Many CDNs turn all three on for you.
  8. Send 103 Early Hints for critical files. The browser starts loading CSS and fonts while the server builds the page. It helps most on pages with long server time. Keep measuring the final response too, since Early Hints can hide a slow server.
Tips & Tricks
TTFB is only the start of page speed. Once it’s under control, our tips to improve website speed cover the rest of the page.

TTFB for WordPress

WordPress builds each page with PHP and database queries unless a cache serves a ready copy. Plugins and the theme add to that work.

Start with these four fixes:

  • A caching plugin: It saves pages as static files and serves those, so the server doesn’t rebuild the page for every visitor.
  • A persistent object cache: Redis or Memcached keeps database results between requests, so repeat queries skip the database.
  • A plugin audit: Deactivate plugins you don’t use. To find a slow one, turn plugins off one at a time and measure TTFB after each.
  • Current PHP and hosting that keeps up: WordPress’s own optimization guide says newer PHP versions usually perform better.
Tips & Tricks
A fast WordPress site can still slow down or go offline after a plugin update or a hosting change. Our WordPress uptime monitoring guide covers what to watch, so you hear about it before your visitors do.

How to monitor TTFB over time

A one-time test tells you today’s TTFB. TTFB monitoring tells you when it changes.

Use two kinds of data. Synthetic monitoring requests your site on a schedule from several regions, so it catches a slowdown even when traffic is low. Real user monitoring (RUM), such as the web-vitals library above, shows how many visitors felt it.

Alert on regressions, not on one slow sample. Set each page’s threshold from its own usual numbers, per region. Our guide to setting a response time alert threshold walks through it.

UptimeRobot response time chart

UptimeRobot’s response time monitoring checks your pages on a schedule and records one total response time per check, not a breakdown of each step. The monitor’s page charts it for each region you check from. On paid plans, you can choose North America, Europe, Asia, and Australia.

When the line climbs, run DevTools, WebPageTest, or curl on the same URL to see which step got slower.

Tips & Tricks
To make every check skip the cache, add *cachebuster* to the monitor’s URL, for example https://example.com/?*cachebuster*. UptimeRobot replaces it with a unique timestamp on each check. More in our cachebuster tip.

Monitor your response time with UptimeRobot

Watch your site’s response time from the regions your visitors are in, and get an alert when it climbs past your threshold. Slow response alerts, with a threshold for each region, are included on Solo and higher plans.

  • Google treats a TTFB of 0.8 seconds or less as good, more than 0.8 and up to 1.8 seconds as needing improvement, and more than 1.8 seconds as poor. It looks at the 75th percentile of real visits, so most page loads need to hit the target, not just the fastest ones.
  • No. The Core Web Vitals are Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS). TTFB comes before all of them, though, so a slow TTFB can still push your LCP out of the good range.
  • Not directly, since TTFB isn’t a Core Web Vital. But a slow TTFB delays Largest Contentful Paint, which is one. Google’s crawl budget guide also says Google crawls less when a site’s responses get slower, which matters most for large sites.
  • Not quite. Server response time usually means how long the server takes to answer a request. TTFB is measured in the visitor’s browser, so it also counts redirects, DNS lookup, and the connection. A fast server can still have a slow TTFB for visitors far away.
  • TTFB ends when the first byte of the HTML arrives. Page load time keeps going until the browser has downloaded and shown the page, including images, scripts, and fonts. A page can have a fast TTFB and still load slowly.
  • Tools measure from different places and stop at different points. Lab tools test once, from one location, often against the final URL and a cached page. Field data covers real visitors, including redirects and pages that aren’t cached.
  • Open DevTools with F12 (Cmd+Option+I on a Mac), select the Network panel, and reload the page. Click the HTML document request and open the Timing tab. The “Waiting for server response” row shows one round trip plus your server’s time, and the DNS Lookup and Initial connection rows above it count toward TTFB too.
  • Usually, for visitors far from your server. A CDN answers from servers closer to them. The biggest gain comes when the HTML itself is cached at the edge. If every request still goes back to your server to build the page, that part of TTFB stays the same.
  • WordPress builds each page with PHP and database queries unless a cache serves a ready copy. The usual causes are no page caching, hosting that can’t keep up, heavy plugins, and an old PHP version. A caching plugin and a persistent object cache usually make the biggest difference.

Start using UptimeRobot today.

Join more than 3.5M+ users and companies!

  • Get 50 monitors for free - forever!
  • Monitor your website, server, SSL certificates, domains, and more.
  • Create customizable status pages.
Laura Clayton

Written by

Laura Clayton

Copywriter |

Laura Clayton has over a decade of experience in the tech industry, she brings a wealth of knowledge and insights to her articles, helping businesses maintain optimal online performance. Laura's passion for technology drives her to explore the latest in monitoring tools and techniques, making her a trusted voice in the field.

Expert on: Cron Monitoring , DevOps

🎖️

Our content is peer-reviewed by our expert team to maximize accuracy and prevent miss-information.

Alex Ioannides

Content verified by

Alex Ioannides

Head of DevOps|

Prior to his tenure at itrinity, Alex founded FocusNet Group and served as its CTO. The company specializes in providing managed web hosting services for a wide spectrum of high-traffic websites and applications. One of Alex's notable contributions to the open-source community is his involvement as an early founder of HestiaCP, an open-source Linux Web Server Control Panel. At the core of Alex's work lies his passion for Infrastructure as Code. He firmly believes in the principles of GitOps and lives by the mantra of "automate everything". This approach has consistently proven effective in enhancing the efficiency and reliability of the systems he manages. Beyond his professional endeavors, Alex has a broad range of interests. He enjoys traveling, is a football enthusiast, and maintains an active interest in politics.

Questions? Contact Support
Feature suggestions? Share

Recent Articles