The short version

No technical background needed for this part.

  • TTFB is the waiting time before anything happens. Time to First Byte is how long a browser, or Google's crawler, waits between asking for a page and receiving the first piece of it. Until then the screen stays blank.
  • Under 0.8 seconds is good, over 1.8 seconds is poor. Those are Google's own thresholds for real visitors.
  • Google doesn't rank on TTFB directly, but it still costs you. A slow first byte delays everything people see, including the loading metrics Google does use. And when a server answers slowly, Googlebot crawls fewer pages, so new products and price changes reach search later.
  • Lighthouse is a different test. Lighthouse (and PageSpeed Insights) gives a score from five loading metrics, and TTFB isn't one of them. It only warns you when the server takes longer than 0.6 seconds. A good Lighthouse score doesn't prove your server is fast for every page.
  • Test from where your customers are, not from where you are. TTFB includes the distance to the server. The same site measured 0.74 seconds from Georgia and 0.12 seconds from New York. For a US server and US customers, only the US number is fair.
  • You can measure it yourself in a minute. This article includes a copy-and-paste script: list your pages, run it, and get each page's TTFB with a verdict.
  • What it means for the business: on WordPress and WooCommerce, slow TTFB is common and usually fixable without rebuilding the site. The biggest wins come from serving ready-made pages from a cache and keeping that cache full.

If you run a WordPress or WooCommerce site and organic search matters to you, read on. The rest of the article explains how TTFB works, how it differs from Lighthouse, and how to check your own pages.

The longer version

Most speed discussions start with images, scripts and Lighthouse scores. TTFB comes before all of that. It is the time your server needs to start answering, and nothing on the page can load, render or be measured until it does.

I check TTFB first on every WordPress and WooCommerce project I work on, because it separates two very different problems: a slow server and a heavy page. The fixes for each have nothing in common.

What TTFB is

Time to First Byte is the time from the moment a browser starts loading a page to the moment the first byte of the response arrives. According to Google's definition on web.dev, it is the sum of several steps:

Step What happens What makes it slow
Redirects http:// to https://, www to no www, an old URL to a new one Chains of several redirects
DNS lookup The browser finds the server's IP address Slow DNS provider, first visit
Connection and TLS The browser connects and sets up HTTPS Distance to the server, slow handshakes
Server wait The server builds the page and starts sending it Uncached pages, slow PHP, heavy database queries

For a WordPress site, the last row is usually the big one. When a page isn't cached, WordPress loads the theme and every active plugin, runs dozens or hundreds of database queries, and only then sends the first byte. On WooCommerce stores with large catalogues and filters, that can take several seconds.

What a good TTFB is

Google's guidance is that 0.8 seconds or less is good, and more than 1.8 seconds is poor. These thresholds apply to real visitors, measured at the 75th percentile: three out of four visits should be under 0.8 seconds.

TTFB is not one of the Core Web Vitals, and Google says so directly. It matters because it sits in front of the metrics that are Core Web Vitals. If the first byte arrives after 1.5 seconds, a 2.5-second Largest Contentful Paint leaves only one second for everything else.

Why TTFB matters for SEO and Googlebot

There are three effects to separate, and only one of them is about rankings.

It's not a direct ranking factor

Google's John Mueller said in 2017 that, as far as he knew, Google didn't use TTFB for anything in search or ranking (reported by Search Engine Roundtable). Nothing official has changed that since. Be wary of articles that promise ranking jumps from TTFB alone.

It drags down the metrics Google does use

Core Web Vitals are part of how Google evaluates page experience, and Largest Contentful Paint is one of them. Every millisecond of TTFB is also a millisecond of LCP, because the browser can't start painting before it has the HTML. A slow server makes a good LCP hard to reach, however well the front end is optimised.

It limits how much Googlebot crawls

This is the effect most site owners miss. Google's crawl budget documentation describes a crawl capacity limit that adapts to your server:

  • If the site responds quickly for a while, "the limit goes up, meaning more connections can be used to crawl."
  • If the site slows down or returns server errors, "the limit goes down and Google crawls less."

For a blog with fifty posts, this hardly matters. For a store with thousands of product, category and filter pages, it decides how quickly Google notices new products, price changes and stock updates. Googlebot also tends to land on pages real visitors rarely open, so it's the crawler that most often hits uncached, slow pages.

You can see Google's side in Search Console under Settings → Crawl stats. The Average response time chart shows how long your server takes to answer Googlebot. If it climbs while the number of crawl requests falls, Google is backing off.

And it costs you visitors

A blank screen is the worst kind of wait, because there is nothing to suggest the page is coming. On a store, the first visitor to an uncached product page from an ad or a search result pays the full price.

People often say "my Lighthouse score is fine, so the site is fast." That can be true and still hide a slow server.

What Lighthouse is

Lighthouse is Google's automated page audit. It runs in Chrome DevTools, from the command line, and behind PageSpeed Insights. It loads one page, once, on a simulated mid-range phone over a throttled mobile network, and produces a score from 0 to 100.

That Performance score comes from five metrics with fixed weights:

Metric Weight
First Contentful Paint 10%
Speed Index 10%
Largest Contentful Paint 25%
Total Blocking Time 30%
Cumulative Layout Shift 25%

TTFB is not on the list. A slow server lowers the score only indirectly, through First Contentful Paint and Largest Contentful Paint.

What Lighthouse checks about the server

Lighthouse does look at the server, as a diagnostic rather than a scored metric. Older versions called it "Reduce initial server response time". Newer versions fold it into the Document request latency insight, which flags three things on the main HTML request:

  • the request was redirected at least once;
  • the server took more than 600 milliseconds to respond;
  • the response wasn't compressed.

The 600 ms is stricter than TTFB's 800 ms because it covers only the server's part. TTFB also includes DNS, the connection and redirects.

Why the numbers disagree

Tool What it measures From where Good for
Lighthouse, lab One load of one page, simulated phone and network Your computer, or Google's servers in PageSpeed Insights Finding front-end problems on a specific page
PageSpeed Insights, field data Real Chrome users, 75th percentile over 28 days, TTFB included Wherever your visitors are Knowing what visitors actually experience
Search Console crawl stats Googlebot's average response time Google's crawlers Seeing how your server treats the crawler
A TTFB script (below) TTFB of any list of pages, as often as you want Wherever you run it Checking many pages, before and after a change

Two things trip people up:

  • Lighthouse tests one page at a time. Your home page may be cached and fast while a thousand product pages are not. Lighthouse won't tell you.
  • Field data needs traffic. Pages with few visitors, often exactly the deep catalogue pages Googlebot crawls, have no field data at all.

That's why I always measure TTFB directly, on a list of real pages.

Test from where your audience is

This is the rule I see broken most often, and I've broken it myself.

I travel a lot, and I work from wherever I am: Europe, Georgia, Thailand, Vietnam. For a while I measured TTFB from wherever I happened to be, and the results made fast sites look slow. That isn't a fair test. TTFB includes the distance between the person testing and the server, and on a first visit the request crosses that distance three times: once to connect, once to set up HTTPS, and once to ask for the page.

Here is this site, pavelcode.com, measured with the script below on the same day. The server is on the US East Coast.

Measured from Median TTFB Network setup Server answer
Batumi, Georgia 735 ms ~460 ms ~245 ms
New York, USA 122 ms ~80 ms ~43 ms

Nothing about the site changed between the two rows. The server did about 20 milliseconds of work in both cases. The other 700 milliseconds from Georgia were three trips across the ocean and back.

So the rule of thumb is simple:

  • Test from where your customers and target audience are. A US store with a server in the US should be tested from the US, ideally from both coasts. Testing it from Thailand or India tells you about the internet between Asia and America, not about your server.
  • For SEO, also test from the US. According to Google, Googlebot's default IP addresses "appear to be based in the USA" (it also crawls from some other countries). So a US test is the closest you'll get to what the crawler sees, even for a European site.
  • A VPN doesn't fix this. With a VPN, your request still starts where you are and crosses the same distance, plus a detour. To test from the US, the test has to run on a machine in the US: a small cloud server, or a testing service with US locations.
  • Your own location is fine for before-and-after comparisons. If you test from the same place and network each time, the distance stays constant, and a change in TTFB is a change in the server.

If your customers are in one region and your server is far away, that's not a measurement problem but a real one: move the server closer or put a CDN in front of it.

How to measure TTFB yourself

In Chrome, for one page

  1. Open the page in a private window, so you're a logged-out visitor.
  2. Open DevTools (F12, or Cmd+Option+I on a Mac) and go to the Network tab.
  3. Reload the page and click the first request, the page itself.
  4. Open the Timing tab. Waiting for server response is the server's part. Everything above it, up to that line, makes up the rest of TTFB.

It's quick, but it's one page from one place, and your browser may reuse a connection that's already open.

With curl, for one page

curl is built into macOS, Linux and Windows 10 and newer. This prints the TTFB of a single page in seconds:

curl -s -o /dev/null -w "TTFB: %{time_starttransfer}s\n" https://example.com/

time_starttransfer is the moment the first byte arrived, measured from the start of the request. It includes DNS, the connection and TLS, like real TTFB.

With a script, for many pages

To check a site properly, you need many pages: the home page, categories, products, posts, and the pages that matter for revenue. This script measures each one several times and gives you a table and a CSV file. It only needs curl.

Step by step:

  1. Create a new text file called ttfb-check.sh and paste the script below into it.
  2. Replace the example addresses in URLS with your own pages, one per line, each in quotes.
  3. Open a terminal in the same folder. On a Mac, that's Terminal; on Windows, use WSL or Git Bash.
  4. Run bash ttfb-check.sh and wait. Each page is requested three times, with a one-second pause in between.
#!/usr/bin/env bash
# ttfb-check.sh: measure Time to First Byte (TTFB) for a list of pages.
#
# 1. Put your pages in URLS below, one per line, in quotes.
# 2. Save the file.
# 3. Run it:  bash ttfb-check.sh
#
# Works on macOS and Linux (and on Windows inside WSL or Git Bash). Needs only curl.

URLS=(
  "https://example.com/"
  "https://example.com/shop/"
  "https://example.com/product/sample-product/"
)

RUNS=3        # requests per page; the first one shows a possible cache miss
PAUSE=1       # seconds between requests, so you don't hammer your own server
USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0 Safari/537.36"

# ---------------------------------------------------------------------------------------------
# Nothing to change below this line.

CSV="ttfb-$(date +%Y%m%d-%H%M%S).csv"
echo "url,run,status,dns_ms,connect_ms,tls_ms,server_ms,ttfb_ms,total_ms,cache" > "$CSV"

ms() { awk -v s="$1" 'BEGIN { printf "%d", s * 1000 + 0.5 }'; }
median() { sort -n | awk '{ a[NR] = $1 } END { if (NR == 0) print 0; else if (NR % 2) print a[(NR + 1) / 2]; else printf "%d", (a[NR / 2] + a[NR / 2 + 1]) / 2 }'; }
verdict() { if [ "$1" -le 800 ]; then echo "good"; elif [ "$1" -le 1800 ]; then echo "needs work"; else echo "poor"; fi; }

# Cache headers set by common page caches and CDNs (Cloudflare, LiteSpeed, nginx, Varnish, hosts).
cache_status() {
  grep -i -E '^(cf-cache-status|x-litespeed-cache|x-cache|x-cache-status|x-proxy-cache|x-nginx-cache|x-kinsta-cache|x-sucuri-cache|x-wpe-cached|x-varnish-cache):' "$1" \
    | head -1 | cut -d: -f2- | tr -d ' \r'
}

printf "\n%-10s %6s %6s %6s %6s  %-10s  %-11s %s\n" "STATUS" "FIRST" "MEDIAN" "SERVER" "NET" "CACHE" "VERDICT" "URL"
printf "%-10s %6s %6s %6s %6s  %-10s  %-11s %s\n" "" "ms" "ms" "ms" "ms" "" "(median)" ""

for url in "${URLS[@]}"; do
  first=""; ttfbs=""; servers=""; nets=""; cache="-"; status=""
  for run in $(seq 1 "$RUNS"); do
    headers="$(mktemp)"
    timings="$(curl -s -o /dev/null -D "$headers" --compressed -A "$USER_AGENT" --max-time 30 \
      -w '%{http_code} %{time_namelookup} %{time_connect} %{time_appconnect} %{time_pretransfer} %{time_starttransfer} %{time_total}' \
      "$url")"
    read -r status dns connect tls pretransfer start total <<< "$timings"

    ttfb_ms=$(ms "$start")
    server_ms=$(( ttfb_ms - $(ms "$pretransfer") ))      # waiting for the server to answer
    net_ms=$(ms "$pretransfer")                           # DNS + connection + TLS
    c="$(cache_status "$headers")"; [ -n "$c" ] && cache="$c"
    rm -f "$headers"

    [ -z "$first" ] && first=$ttfb_ms
    ttfbs="$ttfbs$ttfb_ms\n"; servers="$servers$server_ms\n"; nets="$nets$net_ms\n"
    echo "$url,$run,$status,$(ms "$dns"),$(ms "$connect"),$(ms "$tls"),$server_ms,$ttfb_ms,$(ms "$total"),$cache" >> "$CSV"
    sleep "$PAUSE"
  done

  med=$(printf "$ttfbs" | median)
  printf "%-10s %6s %6s %6s %6s  %-10s  %-11s %s\n" "$status" "$first" "$med" \
    "$(printf "$servers" | median)" "$(printf "$nets" | median)" "$cache" "$(verdict "$med")" "$url"
done

echo
echo "FIRST   TTFB of the first request (a cache miss shows up here)"
echo "MEDIAN  typical TTFB over $RUNS requests"
echo "SERVER  time the server spent before answering (part of TTFB)"
echo "NET     DNS lookup + connection + TLS (the rest of TTFB; grows with distance)"
echo "All requests in: $CSV"

The output looks like this:

STATUS      FIRST MEDIAN SERVER    NET  CACHE       VERDICT     URL
               ms     ms     ms     ms              (median)
200          1912    318     41    270  HIT         good        https://example.com/
200          2240   2195   1920    268  -           poor        https://example.com/shop/
200           302    296     28    265  HIT         good        https://example.com/product/sample-product/

How to read the results

  • FIRST much higher than MEDIAN (the first row): the page wasn't in the cache, so the first request built it and the next ones got the cached copy. Real visitors and Googlebot regularly land on that first request.
  • SERVER high on every run (the second row): the page isn't cached at all, or the cache isn't working for it. This is where WordPress and WooCommerce problems live.
  • NET high, SERVER low: the server is fine, but it's far from you. Test from where your customers are before blaming the server.
  • CACHE column: shows a cache header if your host, plugin or CDN sends one (HIT, MISS, BYPASS). A dash means none was found, not necessarily that there's no cache.
  • Status other than 200: a redirect (301, 302) or an error. Use the final address of the page in your list.

Four rules for honest numbers

  1. Test as a logged-out visitor. The script sends no cookies, which is what Googlebot and new visitors look like. Logged-in pages are usually never cached and will always look slow.
  2. Test from where your customers are. TTFB includes distance (see Test from where your audience is). A store selling in Germany should be measured from Europe, a US store from the US. Run the script on a small cloud server in that region, or use a service like check-host.net, which runs HTTP checks from many countries.
  3. Run it more than once. A single slow request means little. Look at the median, and run the script at different times of day.
  4. Measure before and after every change, with the same list of pages, and keep the CSV files.

A real example: a WooCommerce store

One of the WooCommerce stores I work on for an agency client, a coffee shop with around 860 pages in its sitemap, came to me with an SEO tool report showing an average TTFB of 1.1 seconds across 169 key pages. The worst category pages took 2 to 3 seconds.

The measurements told the story quickly:

  • Cached pages were fine. Pages that weren't in the cache took around 1.2 seconds from my location, and a few category pages took longer.
  • On the server itself, a page served by WordPress with its caching plugin took about 170 milliseconds even when it was cached, because PHP still ran on every request.
  • Most important for SEO: pages expired from the cache regularly, so many visitors and crawlers kept landing on cold pages.

The changes, in general terms: cached pages are now served directly by the web server without starting PHP (about 55 milliseconds on the server), and a small scheduled job requests every sitemap URL every 20 minutes, so expired pages are rebuilt before a visitor or Googlebot asks for them.

After the change, cached pages load in 80 to 200 milliseconds for visitors in the store's own country, and 0.4 to 0.6 seconds from abroad, where distance and the network make up most of the time. Cart, checkout, the account area and two pages with forms are deliberately not cached and take about one second. That's acceptable for pages where a visitor is already buying, and Googlebot doesn't need them.

Keeping TTFB low on WordPress and WooCommerce

What follows are the general principles. How to apply each one depends on the host, the plugins and the store, so the step-by-step versions are coming as separate articles.

  1. Serve cached pages without PHP. A full-page cache that still starts WordPress on every request saves less than you'd think. The fastest setups serve the cached HTML straight from the web server (nginx, LiteSpeed) or from a CDN edge.
  2. Keep the cache warm. A cache only helps the second visitor. Preload pages from your sitemap on a schedule, so new and expired pages are rebuilt before anyone asks. This matters most for large catalogues, because that's where Googlebot finds cold pages.
  3. Know which pages can't be cached, and make them fast anyway. Cart, checkout, account and pages with personalised content are always built live. They depend on an object cache (such as Redis), a lean set of plugins and efficient database queries. The free Query Monitor plugin shows which plugin or query is slow.
  4. Remove redirect chains. Make sure http://, www and trailing-slash variants go to the final URL in one step, and that internal links and the sitemap use the final URL.
  5. Put the server, or a CDN, near your customers. If NET is most of your TTFB, faster code won't help. Distance will.
  6. Give PHP enough room. A current PHP version with OPcache enabled, and enough CPU and memory for the traffic, including crawler traffic.
  7. Measure after every change. Plugin updates and new features slow sites down quietly. A monthly run of the script above catches it before rankings or sales do.

Common questions

What is a good TTFB? 0.8 seconds or less for real visitors at the 75th percentile, according to Google. On a well-cached WordPress site, under 0.3 seconds near your customers is realistic.

Does Lighthouse measure TTFB? Not as part of the score. Lighthouse reports the server's response time on the main document and warns when it's over 600 milliseconds. PageSpeed Insights shows real-visitor TTFB in its field data, when the page has enough traffic.

What's the difference between TTFB and server response time? Server response time is only the server's part: from receiving the request to sending the first byte. TTFB adds redirects, DNS, the connection and TLS. In the script, SERVER is the first and MEDIAN is the second.

What's the difference between TTFB and LCP? TTFB is when the first byte of the page arrives. Largest Contentful Paint is when the biggest visible element, usually a hero image or a heading, appears. LCP always includes TTFB, so a slow TTFB makes LCP slow too.

Does TTFB affect Google rankings? Not directly, as far as Google has said. It affects Largest Contentful Paint, which is part of page experience, and it affects how much Googlebot is willing to crawl.

Why is my TTFB so different from my colleague's? Probably because you're in different places. TTFB includes the distance to the server, so a site can measure 0.1 seconds in one country and 0.7 seconds in another. Compare numbers only when they're measured from the same region, ideally where your customers are.

Why is my WordPress TTFB so slow? Usually because the page wasn't served from a cache: the cache expired, the page is excluded, the visitor is logged in, or there's no full-page cache at all. If even cached pages are slow, look at distance, the hosting and redirects.