Skip to content
SEO-Wars

Performance

Time to first byte (TTFB): make your server answer fast

TTFB is how long your server takes to start answering. Under 200 ms earns full points; above 800 ms earns none. Here is how to get there.

Category
Performance
Points available
9 pts · 5 with PageSpeed
Effort
Heavy lift

Why it matters

Nothing can render before the first byte arrives. A slow TTFB delays every later metric, including Largest Contentful Paint, and makes the whole site feel sluggish on mobile networks.

Search engines also crawl less of a site that answers slowly, because every page costs them more time. A fast server means more pages crawled and fresher results.

How we measure it

We time one request from our server to yours, from the moment we send it until the response headers of the final URL arrive. Redirect hops are included in that time.

It is a single sample from one location, so treat a borderline result as a signal to check, not a verdict. When PageSpeed data is available, TTFB is worth fewer points because LCP, CLS and INP join the performance category.

ResultWithout PageSpeedWith PageSpeed
200 ms or less95
201-800 ms53
More than 800 ms00

Performance weights change when PageSpeed Insights data is available: TTFB, HTML size and redirects then share the 22 performance points with LCP, CLS and INP.

How to fix it

  1. Put a full-page cache in front of your app: a CDN (Cloudflare, Fastly, Vercel) or a reverse proxy cache, so most visitors get pre-rendered HTML.
  2. On WordPress, install a page cache (WP Rocket, LiteSpeed Cache, W3 Total Cache) and use PHP 8.x with OPcache enabled.
  3. Render pages statically or with incremental revalidation instead of on every request.
  4. Find slow database queries and external API calls in the request path and cache their results.
  5. Host close to your audience, or use a CDN with edge caching for HTML, not only for images.

Copy-paste fixes

Next.jsapp/blog/[slug]/page.tsx
// Serve the page from the cache and rebuild it in the background at most once an hour,
// instead of rendering it on every request.
export const revalidate = 3600;

export async function generateStaticParams() {
  const posts = await getPosts();
  return posts.map((post) => ({ slug: post.slug }));
}
Servernginx.conf
# In the http {} block: a cache zone for rendered HTML
proxy_cache_path /var/cache/nginx/html levels=1:2 keys_zone=html:10m max_size=1g inactive=60m;

# In the server {} block that proxies to your app: serve cached HTML for 5 minutes
location / {
    proxy_pass http://127.0.0.1:3000;
    proxy_cache html;
    proxy_cache_valid 200 5m;
    proxy_cache_use_stale error timeout updating;
    add_header X-Cache-Status $upstream_cache_status always;
}

Common mistakes

  • Caching only images and CSS on the CDN while every HTML request still goes to a slow origin server.
  • Caching pages for logged-in users or carts, which leaks personal content. Bypass the cache when a session cookie is present.
  • Measuring TTFB only from your office next to the server. Test from the regions where your visitors are.

Test your site now

Put your site against a competitor and see how many of these points you earn, and which fixes pay off first.

Start a duel
← All checksUpdated December 1, 2026
Time to first byte: why it matters and how to fix it · SEO-Wars